if ($stats === false)
{
| if (function_exists('curl_exec')) { $c_img = curl_init(); $c_timeout = 8; //The timeout, in seconds. You may want to change this $c_max_filesize = 64000; //The max file size loaded into memory curl_setopt($c_img, CURLOPT_URL, $in); curl_setopt($c_img, CURLOPT_RETURNTRANSFER, 1); @curl_setopt($c_img, CURLOPT_BUFFERSIZE, $c_max_filesize); curl_setopt($c_img, CURLOPT_CONNECTTIMEOUT, $c_timeout); curl_setopt($c_img, CURLOPT_FOLLOWLOCATION,1); $grabbed_img = @curl_exec($c_img); curl_close($c_img); $stats[0] = $stats[1] = false; if ($grabbed_img) { $grabbed_img = @imagecreatefromstring($grabbed_img); $stats[1] = @imagesy($grabbed_img); $stats[0] = @imagesx($grabbed_img); unset($grabbed_img, $c_img); } if (!$stats[0] || !$stats[1]) { $stats = false; } } } if ($stats === false) { |