I am looking for a way to verify the status for Remote URIs. I know I can use the file() function to see if it exists, but I don't get the http status. apache_lookup_uri does exactly that but apparently only for local URIs. I want to write a simple link-checker that gives the HTTP-status of each request as a result. Solutions for PHP3 would be preferred 😉
Thomas
Read the RFC for the HTTP protocol, and read the PHP manual about sockets and fsockopen.
All you have to do is open a socket to the remote host and ask for the HTTP header. The first line you get back is the status.