[nycphp-talk] Broken Link Checker
Michele Waldman
mmwaldman at nyc.rr.com
Mon Aug 10 18:22:18 EDT 2009
The curl seemed to be taking a while.
I noticed file_get_contents issues warnings to standard output when the file
is not found:
Warning: file_get_contents(http://www.AkronGayRealEstate.com/theImages[i];):
failed to open stream: HTTP request failed! HTTP/1.
1 404 Not Found
A try catch block didn't seem to intercept this.
How can I catch a warning in the code?
Margaret Michele Waldman
Sovereign Sites L.L.C.
Website Development
646-861-3375
Rule your domain ...
> -----Original Message-----
> From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
> On Behalf Of Hans Zaunere
> Sent: Monday, August 10, 2009 1:41 PM
> To: 'NYPHP Talk'
> Subject: Re: [nycphp-talk] Broken Link Checker
>
> > Right. I don't want 401. Do you know which php function can be used
> > to check that?
>
> http://us.php.net/curl
>
> http://us.php.net/manual/en/book.http.php
>
> http://us.php.net/manual/en/wrappers.http.php
>
> ... depending on your version of PHP and what's available on the server.
> The first or last options above are probably more likely to be available.
>
> H
>
>
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show_participation.php
More information about the talk
mailing list