I've made a script where a user can add an image (or image information rather) to a database.
Now what I need to know, is if there is a way that I can check that an entered URL actually exists, I don't want them to be able to link to an image that does not exist.
URL Checking
Moderator: General Moderators
Perhaps the following might be of use. Tweak and add more to fit your solution.
Code: Select all
<?php
if($foo = @getimagesize('http://forums.devnetwork.net/templates/subSilver/images/logo_phpBB.gif')) {
echo '<pre>';
print_r($foo);
echo '</pre>';
}
?>