Hello, I am trying to create a script that will detect if a URL exists or not. I was using the function, file_exists, but every single time it returns false, regardless if the URL exists or not. Is there any alternative to this?![]()
![]()
THe code is as follows:
PHP Code:<?php
$file = 'http://www.google.com/'
if (file_exists($file)) {
echo ('This URL exists!');
}
else {
echo ('This URL is unavailable');
}
?>



Reply With Quote



Bookmarks