Page 1 of 1

Image maniupulation with php. Help!

Posted: Sat Sep 05, 2009 5:06 am
by viridian9
I'm trying to get my ip to display ontop of this image but I'm getting a multitude of errors.

Code: Select all

 
<?
header(”Content-type: image/png”);
$im = imagecreatefrompng (”yourip.png”);
$colour = imagecolorallocate($im, 255, 255, 255);
$ip = “$_SERVER[REMOTE_ADDR]“;
imagestring($im, 3, 71, 2, $ip, $colour);
imagepng($im);
?>
 
The errors are

Code: Select all

 
 
Use of undefined constant ”yourip - assumed '”yourip' 
 
 
Use of undefined constant png” - assumed 'png”'
 
and
 
Warning</b>:  imagecreatefromjpeg(”yourippng
 
 

Re: Image maniupulation with php. Help!

Posted: Sat Sep 05, 2009 6:02 am
by requinix
Smart quotes. They are bad.

Get rid of them and use normal "s instead.