David Otton wrote:
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?

[...]
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.

Maybe there are good standalone-link-checkers, but I need to integrate it in an application and my customer has some special wishes. Anyways I finished writing the link-checker.


A thing which seemed a bit confusing to me is that if I open a non-existing website (fopen('http://www.amazon.de/nonsensestuff')) I always get an error message "Success". It's the same thing if I use file(). The manual explains that fopen() returns false if the website could not be opened, that's why I don't know why this error message appears? Besides this "Success"-message is surely a very bad error message. I use PHP 4.2.3.

Jens




-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to