Well, as the title says..
It's a part of the YASS image generator that seems to be causing extreme load on the server. When an image that contains emoticons is attempted to be rendered, things go downhill. I can't load any page on the server,and logging into FTP is next to impossible. commenting the following block of code, allows loading return to normal once more. anyone want to take a stab as to what's happening?
code:
$baseheight = imagettfbboxext($nicksize, 'resources/font/'.$imgitem[$imgdata['nick_font']], '|');
if ($baseheight['height'] < 19)
$emotesize = $baseheight['height'];
else
$emotesize = 19;
$spacewidth = imagettfbboxext($nicksize, 'resources/font/'.$imgitem[$imgdata['nick_font']], ' ');
$spacer = ' ';
$i=0;
while(strlen($spacer)*$spacewidth['width'] < $emotesize && $i++ < 30)
$spacer .= ' ';
$emoteoffsetx = floor(abs((strlen($spacer)*$spacewidth['width']-$emotesize)/2+1));
$emoteoffsety = floor(abs(($baseheight['height']-$emotesize)/2));
$i=0;
while ($i <= count($smileys_from)){
$pos = strpos($strUsername, $smileys_from[$i]);
if ($pos !== FALSE){
$imgEmote = imagecreatefrompng('resources/emotes/' . $smileys_to[$i] . '.png');
$emotepos = imagettfbboxext($nicksize, 'resources/font/'.$imgitem[$imgdata['nick_font']], substr($strUsername, 0, $pos));
imagecopyresized($imgBack, $imgEmote, $emotepos[4] + $imgdata['nick_x'] + $emoteoffsetx, $emotepos[7] + $imgdata['nick_y'] + $emoteoffsety, 0, 0, $emotesize, $emotesize, imagesx($imgEmote), imagesy($imgEmote));
$strUsername = str_replace_once($smileys_from[$i], $spacer, $strUsername);
imagedestroy($imgEmote);
} else {
$i++;
}
}