Forum Moderators: coopster

Message Too Old, No Replies

Fetching contents of a 404 page

         

GeneVincent

7:29 pm on Jun 11, 2006 (gmt 0)

10+ Year Member



Fetching the content of web pages with file_get_contents() works fine so far. But now I also want to fetch the contents of an error page. Because of the 404 status, I don't get the HTML of the page.

I guess, I could work around this by using some external utility like wget, but I'd like to avoid external tools.

Is there a way to tell file_get_contents() to ignore the HTTP response code?

barns101

10:46 am on Jun 12, 2006 (gmt 0)

10+ Year Member



Maybe you should use fsockopen [php.net] instead.