Quote:
Originally posted by hellsatan
@Smoothie - Controlling the Banner is proving to be difficult - Seeing as the url is stored, not the image, it is hard to find a way to limit the size of the banner...
Satan
|
That would be a simple one to get around.
PHP Code:
/* Add to functions.php */
function checkimagesize($imageurl){
global $maxwidth, $maxheight;
$size = getimagesize($imageurl);
if($size[0]>=$maxwidth&&$size[1]>=$maxheight){
return true;
}else{
return false;
}
}
/* Usage */
if(checkimagesize($image)){
//display
}else{
//skip this ad and get another one
}
Code's untested, but it should work.