LanceT Posted March 6, 2007 Share Posted March 6, 2007 The user is able to send a URL to the script, then the script should read this url (an image file) and determine the height and width of the image and then display it resized. How can I go about checking for the width and height of a URL? Link to comment https://forums.phpfreaks.com/topic/41476-checking-the-width-and-height-of-an-image/ Share on other sites More sharing options...
Wuhtzu Posted March 6, 2007 Share Posted March 6, 2007 I assume the URL you are talking about is something like: http://www.domain.com/something/image.jpg <?PHP $image = http://www.domain.com/something/image.jpg; $size=getimagesize($image); $width=$size[0]; $height=$size[1]; ?> Now you just need to somehow get that url - i don't know if your users post it using a form or they can type it in the address bar or what they do... Link to comment https://forums.phpfreaks.com/topic/41476-checking-the-width-and-height-of-an-image/#findComment-200956 Share on other sites More sharing options...
LanceT Posted March 6, 2007 Author Share Posted March 6, 2007 im gettin this error Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in Link to comment https://forums.phpfreaks.com/topic/41476-checking-the-width-and-height-of-an-image/#findComment-201114 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.