PHP getimagesize without URL file-access -


i using getimagesize in php information image in script...

$thumb = "http://i.ytimg.com/vi/u6xapnufjjc/hqdefault.jpg"; $imageinfo = getimagesize($thumb); 

the problem on 1 of servers, returning error:

getimagesize() [function.getimagesize]: url file-access disabled in server configuration

i not able fix configuration issue on specific server. i'm wondering if has ideas on how can work around issue. possible take image, save temporary file , use getimagesize based on temporary image? once done, temporary file need deleted.

if possible, how this?

since you're able change server configuration, check if curl enabled.

if is, can use curl copy image locally , run getimagesize on it.

http://php.net/manual/en/book.curl.php


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -