Image maniupulation with php. Help!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
viridian9
Forum Newbie
Posts: 4
Joined: Wed Sep 02, 2009 5:51 am

Image maniupulation with php. Help!

Post 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
 
 
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Image maniupulation with php. Help!

Post by requinix »

Smart quotes. They are bad.

Get rid of them and use normal "s instead.
Post Reply