Moh
22-07-2008, 06:01 PM
Well we have GD installed on our server, or else all the other GD images around the site wouldn't work (Then again, I think you have to set which image types can work)
Heres the contents of our file:
Yes, all the urls are correct :P
<?php
$name = $_GET["habbo"];
$hotel = $_GET["hotel"];
header("Content-Type: image/gif");
$im = imagecreatefrompng("spotlight.PNG");
$thumbWidth = "60";
$thumbHeight = "120";
$url = "http://www.habbo.$hotel/habbo-imaging/avatarimage?user=$name&action=&direction=4&head_direction=3&gesture=sml&size=l&img_format=png";
$srcImg = imagecreatefrompng($url);
$origWidth = imagesx($srcImg);
$origHeight = imagesy($srcImg);
$thumbImg = imagecreate($thumbWidth, $thumbHeight);
imagecopyresized($thumbImg, $srcImg, 0, 0, 0, 0, $thumbWidth, $thumbHeight, imagesx($thumbImg), imagesy($thumbImg));
$ImgWhite = imagecolorallocate($thumbImg, 255, 255, 255);
imagefill($thumbImg, 0, 0, $ImgWhite);
imagecolortransparent($thumbImg, $ImgWhite);
$font = "Volter.ttf";
$size = "6.5";
$white = imagecolorallocate($im, 255, 255, 255);
$text = $name;
$img_w = imagesx($im);
$img_h = imagesy($im);
imagettftext($im, $size, 0, ($img_w / 2)-(strlen($name)*imagefontwidth($font) /2), 130, $white, $font, $name);
imagegif($im);
imagedestroy($im);
die();
?>
Moved by Invent (Forum Moderator) from Designing & Development: Please post in the correct forum next time, thanks :).
Heres the contents of our file:
Yes, all the urls are correct :P
<?php
$name = $_GET["habbo"];
$hotel = $_GET["hotel"];
header("Content-Type: image/gif");
$im = imagecreatefrompng("spotlight.PNG");
$thumbWidth = "60";
$thumbHeight = "120";
$url = "http://www.habbo.$hotel/habbo-imaging/avatarimage?user=$name&action=&direction=4&head_direction=3&gesture=sml&size=l&img_format=png";
$srcImg = imagecreatefrompng($url);
$origWidth = imagesx($srcImg);
$origHeight = imagesy($srcImg);
$thumbImg = imagecreate($thumbWidth, $thumbHeight);
imagecopyresized($thumbImg, $srcImg, 0, 0, 0, 0, $thumbWidth, $thumbHeight, imagesx($thumbImg), imagesy($thumbImg));
$ImgWhite = imagecolorallocate($thumbImg, 255, 255, 255);
imagefill($thumbImg, 0, 0, $ImgWhite);
imagecolortransparent($thumbImg, $ImgWhite);
$font = "Volter.ttf";
$size = "6.5";
$white = imagecolorallocate($im, 255, 255, 255);
$text = $name;
$img_w = imagesx($im);
$img_h = imagesy($im);
imagettftext($im, $size, 0, ($img_w / 2)-(strlen($name)*imagefontwidth($font) /2), 130, $white, $font, $name);
imagegif($im);
imagedestroy($im);
die();
?>
Moved by Invent (Forum Moderator) from Designing & Development: Please post in the correct forum next time, thanks :).