What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP Images... I can't make one. :(

PHP Images... I can't make one. :(
Author: Message:
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: PHP Images... I can't make one. :(
quote:
Originally posted by Guillaume
-dt-, I tried your script and I got:
That was because you had to remove the code that echoed text. As I said above, you should get rid of that if you're outputting an image. I see that it's gone in the latest code you posted, so good. (y)

quote:
Originally posted by Guillaume
And WDZ, How do you add line breaks between strings?
In a regular string, you would use the line break character as Segosa said, \n. But in an image, you need to increase the vertical coordinate in your imagestring() function to go to a new line (see the $line = $line +10; in dt's code).

quote:
Originally posted by Guillaume
Did I do something wrong?
Yeah, this...
$rumble_pit \n $team_skirmish
should be inside a string...
"$rumble_pit\n$team_skirmish"

But like I said, you can't use a line break in an image. You have to do something like this...
code:
$line = 5;
imagestring($im, 1, 5, $line, $rumble_pit, $text_color);
$line = $line + 10;
imagestring($im, 1, 5, $line, $team_skirmish, $text_color);
That will create an image with a 1 and a 5 below it. If you want labels, just use strings like so...
code:
$line = 5;
imagestring($im, 1, 5, $line, "Rumble pit: $rumble_pit", $text_color);
$line = $line + 10;
imagestring($im, 1, 5, $line, "Team skirmish: $team_skirmish", $text_color);
Now that will show the following text on the image...
code:
Rumble pit: 1
Team skirmish: 5
01-21-2005 09:29 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP Images... I can't make one. :( - by Moo on 01-19-2005 at 12:07 AM
RE: PHP Images... I can't make one. :( - by fluffy_lobster on 01-19-2005 at 04:51 PM
RE: PHP Images... I can't make one. :( - by -dt- on 01-19-2005 at 05:32 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-19-2005 at 09:06 PM
RE: PHP Images... I can't make one. :( - by WDZ on 01-19-2005 at 09:12 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-19-2005 at 09:19 PM
RE: PHP Images... I can't make one. :( - by WDZ on 01-19-2005 at 09:34 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-19-2005 at 09:36 PM
RE: PHP Images... I can't make one. :( - by WDZ on 01-19-2005 at 09:42 PM
RE: RE: PHP Images... I can't make one. :( - by Moo on 01-19-2005 at 09:51 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-19-2005 at 09:59 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-19-2005 at 10:37 PM
RE: PHP Images... I can't make one. :( - by -dt- on 01-20-2005 at 07:04 AM
RE: PHP Images... I can't make one. :( - by Moo on 01-20-2005 at 10:24 PM
RE: RE: PHP Images... I can't make one. :( - by -dt- on 01-21-2005 at 04:36 AM
RE: PHP Images... I can't make one. :( - by WDZ on 01-21-2005 at 04:29 AM
RE: PHP Images... I can't make one. :( - by Moo on 01-21-2005 at 08:30 PM
RE: PHP Images... I can't make one. :( - by segosa on 01-21-2005 at 09:02 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-21-2005 at 09:08 PM
RE: PHP Images... I can't make one. :( - by WDZ on 01-21-2005 at 09:29 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-21-2005 at 09:38 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-21-2005 at 09:56 PM
RE: PHP Images... I can't make one. :( - by WDZ on 01-21-2005 at 10:01 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-21-2005 at 10:05 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-21-2005 at 10:07 PM
RE: PHP Images... I can't make one. :( - by WDZ on 01-21-2005 at 10:12 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-21-2005 at 10:13 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-21-2005 at 10:43 PM
RE: PHP Images... I can't make one. :( - by WDZ on 01-21-2005 at 10:59 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-21-2005 at 11:03 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-22-2005 at 12:35 AM
RE: PHP Images... I can't make one. :( - by -dt- on 01-22-2005 at 11:11 AM
RE: PHP Images... I can't make one. :( - by Moo on 01-22-2005 at 03:48 PM
RE: PHP Images... I can't make one. :( - by Moo on 01-22-2005 at 04:25 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On