anubis
-
Posts
6 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by anubis
-
-
I already tried putting a space there, and i'll post my updated script:
<?php$im = imagecreatefrompng("custom2.png");if(!$im){die("");}$string = $_GET['text']; $orange = imagecolorallocate($im, 255, 180, 0);imagestring($im, 2, 5, 5, $string, $orange);header("Content-type: image/png");header("Content-Disposition: inline; filename=custom.png");imagepng($im);imagedestroy($im);?>
EDIT: now i'm getting
The image “http://arkonfx.com/images/pins/custom.png” cannot be displayed, because it contains errors. -
Ok, i've tried a couple of different hosts, none of which it worked on, and I tried 3 different browsers, and 2 wanted to download it and the last (internet explorer) just wants to see the code.
-
what should I use for the Content-Disposition line?EDIT: just tried all the functions for Content=Disposition, and none worked.
-
ok, I got rid of the htaccess, but it still wants to download it. I don't know why this is happening cause regular .png files work, but this one doesn't.EDIT: the main reason i'm trying this is because I want it to work on my IPB forums.
-
Well, I made a php script that will add text to an image. Anyways, I converted it to .png, wrote an .htaccess file for it and everytime I run it my computer wants to download it.Anyways, here's the .png (actually a php):
<?$im = imagecreatefrompng("custom2.png");if(!$im){die("");}$string = $_GET['text']; $orange = imagecolorallocate($im, 255, 180, 0);imagestring($im, 2, 5, 5, $string, $orange);header("Content-type:image/png");imagepng($im);imagedestroy($im);?>
and here's the .htaccess:
<Files custom.png>ForceType application/x-httpd-php</Files>
Any help is greatly appreciated.Anubis
help with php image
in PHP
Posted
that's wierd, shift your idea didn't work.