Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

[Php] Text to image

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
NamecheapNamecheap
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
Close
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
Close
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
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Member card: see how many threads a member started
The member card now shows a Threads number, right after Posts. The member card is the box that opens when you point at a name. Profile...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back