how do i get url: response codes?
| From: | Patrick Sibenaler | Date: | Thu, 12 Jul 2001 10:28:29 +0000 |
| Subject: | how do i get url: response codes? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-57562@lists.php.net to get a copy of this message | ||
I've tried for a while now to figure out how to test from within php
if a url (http://xxx/file.html) is present and what error code is
returned (200,201,202,404, etc...)
the only way to test a url seems to be to open
file('http://xxx/file.html')
and see if it can be done. but that completely suppresses any error
codes and especially redirects. Has anyone figured out how to pull out
http error codes using php?
greets./