I'm looking for a way to find out the error code (404, 301, etc.) returned from a web server for any given URL. Say I put in http://www.atommic.com/nonexistant_url. (I already know the server is a valid host and allows http connections.) It should then give me 404 as a result.
I don't know if this is something that should be obvious... I'm relatively new to PHP, but I looked through the documentation, and I couldn't find any good methods aside from using a socket to establish an HTTP connection to do what I need.
Does anyone know a way to do this?
Thanks

