On Sun, 23 Mar 2003 21:21:39 +0100, you wrote: >The following short script retrieves a file over HTTP: > >$url = 'http://www.example.com/'; >implode('',file($url)); // or file_get_contents() > >Now I'd like to find out which file was really retrieved, for instance >http://www.example.com/index.html. Is this possible and how?
Difficult - you made a request, and the webserver returned a response. Whether or not the webserver maps your request to a specific file - or if it even has any concept of a file - is it's own internal matter. Having said that, you could try the Content-Location header, and the 3xx status codes. >I need to write a small link-checker (Intranet), which reads in all >links within a file and then looks if they're broken and collects some >information. Unfortunately I didn't find a simple, free link-checker >that's why I write my own. It would be good to find out the "complete" >url, because I want to collect the file-endings (.php,.html, ...). I really think this already exists. You should probably search a bit harder. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php