note 55006 added to function.imagestring
| From: | ola dot nate at electripoint dot com | Date: | Fri, 22 Jul 2005 09:18:57 +0000 |
| Subject: | note 55006 added to function.imagestring | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92277@lists.php.net to get a copy of this message | ||
Hmm ok the follwing will show someones ip adress in a picture
<?php
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
header ("Content-type: image/jpg");
$string = "$hostname";
$font = 50;
$width = ImageFontWidth($font) * strlen($string);
$height = ImageFontHeight($font);
$im = @imagecreate ($width,$height);
$background_color = imagecolorallocate ($im, 0, 255, 255); //white background
$text_color = imagecolorallocate ($im, 0, 0,0);//black text
imagestring ($im, $font, 0, 0, $string, $text_color);
imagejpeg ($im);
?>
But what i want is to be able to input a simple page break after $hostname so i can add more
variables to the picture there and so on ...
----
Manual Page -- http://www.php.net/manual/en/function.imagestring.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55006
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55006&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55006&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55006&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55006&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55006&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55006&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55006&report=yes
Search -- http://master.php.net/manage/user-notes.php