I've got a field that takes a URL in the form of 'http://.../somefile.jpg' (without quotes) and I'd like to somehow check that the URL to the image they've provided returns an actual image file. Is there any other way to do this, other than fopen ($_POST['url'])? Even using fopen(), would I be able to assure that the file returned is actually a JPEG?
Any suggestions would be greatly appreciated. In the meantime, I'll just allow broken URLs.