Re: Check Url Exists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Binoy AV wrote:
>    In my php file, I want to check whether the url(residing on  another
> server) is existing or not.

Depending on configuration and settings, either:
http://php.net/file_exists
http://php.net/curl

Be aware that due to connectivity or dog-slow servers, you will get false
negatives fairly often.

You may want to record the existence with several checks spread out over a
few days before deciding that a URL truly doesn't exist.

With a slow server at the other end, that still won't be completely
reliable...

Also note that just because a URL exists, does not guarantee that it's any
good -- Domain name squatters and their link farms abound.

So you may also want to compare the actual output of the file with
expected results to see if it's valid or not.

This can get really complex really fast, as you might imagine.

-- 
Like Music?
http://l-i-e.com/artists.htm

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux