View Single Post
Old 03-08-2003, 04:52 PM  
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
Quote:
Originally posted by Voodoo
This might help...

[?php
$sig_URL = "../../../sig.gif,jpg,swf";
$sig_dim = getimagesize($sig_URL);
$calc = $sig_URL[0] * $sig_URL[1];

if($calc >= "7201") {
echo "Your Sig Is Tooooo Big!";
}
php?]

It would need to be modified a bit to find/replace the images in the sig code, but, it's a start.
Since sigs contain more than an image, you'd need regexps to find the pics.
Also, $sig_URL[0] and $sig_URL[1] should be $sig_dim[0] and $sig_dim[1]
Besides that, calculation seems unnecessary - just check if either width or height is higher than it's supposed to be. A 1*7200 image would then also be killed
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote