Don't use this function in loops as it's pretty slow:
leibwaechter at web dot de
<?php
function url_exists($url)
{
$handle = fopen($url, "r");
if ($handle === false)
return false;
fclose($handle);
return true;
}
?>
Best in situations where it is a one off. Better still try
to do without it. Checking lots of addresses with this
involves lots of dns lookups etc.
----
Server IP: 83.138.144.80
Probable Submitter: 82.71.67.46
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- https://master
.php.net/note/edit/71447
Del: integrated -- h
ttps://master.php.net/note/delete/71447/integrated
Del: useless -- http
s://master.php.net/note/delete/71447/useless
Del: bad code -- htt
ps://master.php.net/note/delete/71447/bad+code
Del: spam -- https:/
/master.php.net/note/delete/71447/spam
Del: non-english --
https://master.php.net/note/delete/71447/non-english
Del: in docs -- http
s://master.php.net/note/delete/71447/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/71447
Reject -- https://mast
er.php.net/note/reject/71447
Search -- https://
master.php.net/manage/user-notes.php
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|