View file game/chat/im.php

File size: 834B
<?
//POWERED by ILI
// ICQ : 197042
//site: ili.wab.ru
// ilichat v4.0
 header("Content-type:image/jpeg");
 $pic = $_GET["pic"];
 if(substr($pic,0,1)!=".")
  {
 if(preg_match("/\.gif$/i", $pic)) $old = imageCreateFromGif("$pic");
 if(preg_match("/\.jpg$|\.jpeg$|\.jpe$/i", $pic)) $old = imageCreateFromJpeg("$pic");
 if(preg_match("/\.png$/i", $pic)) $old = imageCreateFromPng("$pic");
  {
    $w_old = imageSX($old);
    $h_old = imageSY($old);
	$w=60;
	$h=60; 
	if($w_old>$h_old) {
	  $rat=$w_old/$w; 
	}
	else {
	  $rat=$h_old/$h;
	}
    $w_new=round($w_old/$rat); // ширина картинки
    $h_new=round($h_old/$rat); // высота картинки
    $new = imageCreateTrueColor($w_new, $h_new);
    imageCopyResized($new, $old, 0, 0, 0, 0, $w_new, $h_new, $w_old, $h_old);
    imageJpeg($new,"","100");
  }
  }
?>