PDA

View Full Version : PHP Help



Lysine
25-02-2007, 06:41 PM
Hi,

I have this code which someone made on this forum but there is a problem with it. It grabs your Mission, Name, and Habbo But it does not display it in the correct place.

http://www.thishabbo.net/trophey/habbo.php?habbo=Lysine

That is the lnik where you can see it.
This is the way it's coded :-


<?php

$html = file_get_contents('http://habbo.co.uk/home/'.$_GET['habbo']);
$addr = 'http://habbo.co.uk/'.preg_replace('/.*re">.*<img alt=".*" src="(.*?)" \/.*/', '$1', str_replace("\n", '', $html));
$mish = preg_replace('/.*tto">(.*?)<.*/', '$1', str_replace("\n", '', $html));
ereg(' ', $addr) and die;
$i1 = imagecreatefromgif($addr);
$i2 = imagecreatefromgif('pedestal.gif');
$c1 = imagecolorallocate($i2, 0xFF, 0xFF, 0xFF);
$c2 = imagecolorallocate($i2, 0x00, 0x00, 0x00);
$f1 = imageloadfont('voltar.gdf');
imagecopymerge($i2, $i1, 82, -17, 0, 0, 60, 120, 100);
imagestring($i2, $f1, 80-((strlen($_GET['habbo'])/2)*imagefontwidth($f1)), 101, $_GET['habbo'], $c1);
imagestring($i2, $f1, 140-(strlen(trim($mish))*5), 117, $mish, $c2);
header('content-type: image/gif');
imagegif($i2);

?>

+ Rep for help :)

Invent
25-02-2007, 06:45 PM
Learn PHP, move it yourself.

Dont be spoon fed code.

Mentor
25-02-2007, 06:50 PM
change the co-ordianates of where your dumpin the text o.0

PixelWill
25-02-2007, 07:51 PM
Learn PHP, move it yourself.

Dont be spoon fed code.

What I was about to say.

Lysine
25-02-2007, 11:01 PM
I have tried moving the co-ordianates but it just mucks up.

PixelWill
26-02-2007, 04:22 PM
It should work if yuo move the co-ordinates.

I'll try and see if I can get it to sit right and get the code back.

No promising anything<3

Lysine
26-02-2007, 04:27 PM
I have done the name and mission but i dont know how to move the actual picture of the habbo down.

http://www.thishabbo.net/trophey/habbo.php?habbo=Lysine

nets
26-02-2007, 08:28 PM
I'm assuming that's the one I wrote. You're using a different font/backgruond image to what I used.

http://xs.to/xs.php?h=xs412&d=07091&f=pedestal.gif

PixelWill
27-02-2007, 04:24 PM
nets, which srpt did you write?

Could you prehaps give me the link?

:Edzy
27-02-2007, 04:30 PM
learn how to spell trophy :)

Lysine
28-02-2007, 11:33 PM
Does anyone know the code where i can add a badge?

Invent
28-02-2007, 11:36 PM
Now nets I know you like love Open Source and all that. But please DONT post the code for him.

Let him actually read the code for himself and let him realise how to do it by himself. He will benefit alot more by doing it (:

Want to hide these adverts? Register an account for free!