Lysine
12-02-2007, 11:42 PM
I was on habboforum.com and saw that someone has posted the code for a slate to go under your habbo.
Do i add the two codes into the 1 PHP file?
This is how i have done it but it does not work. The habbo shows but the slate does not.
<?
header("Content-type: image/gif");
$habbo = $_GET[habbo];
$domain = 'http://www.habbo.co.uk';
$content = file_get_contents($domain . '/home/'.$habbo);
$div_start = explode('<div class="profile-figure">', $content, 2);
$div_end = explode('</div>', $div_start[1], 2);
$img = trim($div_end[0]);
$img = preg_replace('/<img alt=\"(.*?)\" src=\"(.*?)\" \/>/', '$2', $img);
$imag = $domain.$img;
$im = imagecreatefromgif($imag);
imagegif($im);
imagedestroy($im);
?>
<?php
header("Content-type: image/gif");
$habbo = $_GET[habbo];
$habbo_image = 'http://thishabbo.net/habboimager/'.$habbo.'.gif';
$background_image = 'http://thishabbo.net/habboimager/slate.gif';
$habbo = imagecreatefromgif($habbo_image);
$slate = imagecreatefromgif($background_image);
$habbo_width = imagesx($habbo);
$habbo_height = imagesy($habbo);
$gap = 125-($habbo_height+10);
$middle = (70/2)-($habbo_width/2)+3;
imagecolortransparent($slate,imagecolorexact($slat e,255,0,255));
imagecopymerge($slate,$habbo,$middle,$gap,0,0,$hab bo_width,$habbo_height,99);
imagegif($slate);
imagedestroy($slate);
?>
http://www.thishabbo.net/habboimager/habbo.php?habbo=Lysine
That is what it shows at the moment with them two files included in 1 PHP file.
Do i add the two codes into the 1 PHP file?
This is how i have done it but it does not work. The habbo shows but the slate does not.
<?
header("Content-type: image/gif");
$habbo = $_GET[habbo];
$domain = 'http://www.habbo.co.uk';
$content = file_get_contents($domain . '/home/'.$habbo);
$div_start = explode('<div class="profile-figure">', $content, 2);
$div_end = explode('</div>', $div_start[1], 2);
$img = trim($div_end[0]);
$img = preg_replace('/<img alt=\"(.*?)\" src=\"(.*?)\" \/>/', '$2', $img);
$imag = $domain.$img;
$im = imagecreatefromgif($imag);
imagegif($im);
imagedestroy($im);
?>
<?php
header("Content-type: image/gif");
$habbo = $_GET[habbo];
$habbo_image = 'http://thishabbo.net/habboimager/'.$habbo.'.gif';
$background_image = 'http://thishabbo.net/habboimager/slate.gif';
$habbo = imagecreatefromgif($habbo_image);
$slate = imagecreatefromgif($background_image);
$habbo_width = imagesx($habbo);
$habbo_height = imagesy($habbo);
$gap = 125-($habbo_height+10);
$middle = (70/2)-($habbo_width/2)+3;
imagecolortransparent($slate,imagecolorexact($slat e,255,0,255));
imagecopymerge($slate,$habbo,$middle,$gap,0,0,$hab bo_width,$habbo_height,99);
imagegif($slate);
imagedestroy($slate);
?>
http://www.thishabbo.net/habboimager/habbo.php?habbo=Lysine
That is what it shows at the moment with them two files included in 1 PHP file.