Jump to content


Photo

problems creating images


  • Please log in to reply
3 replies to this topic

#1 JunoMR2

JunoMR2
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 11 July 2006 - 06:11 AM

if you go to ubermodest.com, you can see the problem at the bottom of the page.

here is the code that makes the image ( not my own );

$img_number = imagecreate(275,25);
$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,255,255,255);

imagefill($img_number,0,0,$backcolor);
$number = " Your IP is $_SERVER[REMOTE_ADDR]";

Imagestring($img_number,10,5,5,$number,$textcolor);

header("Content-type: image/jpeg");
imagejpeg($img_number);


www.ubermodest.com

_Juno

#2 Prismatic

Prismatic
  • Members
  • PipPipPip
  • Advanced Member
  • 503 posts
  • LocationSan Diego

Posted 11 July 2006 - 07:03 AM

Make this genimage.php
<?php
$img_number = imagecreate(275,25);
$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,255,255,255);

imagefill($img_number,0,0,$backcolor);
$number = " Your IP is ". $_SERVER[REMOTE_ADDR];

Imagestring($img_number,10,5,5,$number,$textcolor);

header("Content-type: image/jpeg");
imagejpeg($img_number);
?>

then on your site do
<img src="genimage.php" alt="Your IP" width="275" height="25"> 


#3 JunoMR2

JunoMR2
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 July 2006 - 03:55 AM

did that, same result.

#4 JunoMR2

JunoMR2
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 July 2006 - 04:01 AM

nevermind. in Zend that doesn't work. however, on my live server it does work. thanks

_Juno




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users