NameSilo

[Php] Text to image

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

dcgamers

Established Member
Impact
1
PHP:
<?
header ("Content-type: image/pjpeg");
$string = "[copyright] 2007";
$im = ImageCreateFromjpeg($imm);
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 255, 255,255);//black text
imagettftext ($im, "12", "0", 10, 20, $text_color, "verdana.ttf", $string);
imageinterlace($im, 1);
imagejpeg($im);
?>
I'm tring to add text to an image and It works and shows the image but now I want it to save the image. I thought that imagejpeg() does that automatically but it didn't. I need help here.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
•••
Ok, I did that and the page with the function just shows the url of the page itself and under view source it says that it was unable to open the file (yes it's 777) any idea whats the problem?

found the problem, now I have another. When I add images to my server, I want them to get this text. In order to do that, they need to be CHModed to 777. I can do that on a script but safemode is active. How can I disable safemode?
 
0
•••
dcgamers said:
Ok, I did that and the page with the function just shows the url of the page itself and under view source it says that it was unable to open the file (yes it's 777) any idea whats the problem?

found the problem, now I have another. When I add images to my server, I want them to get this text. In order to do that, they need to be CHModed to 777. I can do that on a script but safemode is active. How can I disable safemode?

I'm not sure if you can disable safemode :( http://uk.php.net/features.safe-mode I'm presuming you're on shared hosting.
 
0
•••
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back