Jump to content
xisto Community
Sign in to follow this  
brouzine

Php Image

Recommended Posts

i believe you need to use the ImageString() function. this is the link:

ImageString()

I believe you will find the information that you need from there.

Hope it all goes well.

Show me the finished product if you manage to do it!

Share this post


Link to post
Share on other sites

you will need gd with freetype and xpm.try some code like this:<?$img_number = imagecreate(350,22);$white = imagecolorallocate($img_number,255,255,255); $black = imagecolorallocate($img_number,0,0,0); $grey_shade = imagecolorallocate($img_number,204,204,204); $dark = imagecolorallocate($img_number,225,220,125); Imagettftext($img_number, 18,0,0,17,$dark,'/path/to/somefont.ttf',"image create text");header("Content-type: image/jpeg"); imagejpeg($img_number);?>

Share this post


Link to post
Share on other sites

<?phpini_set('error_reporting', E_ALL);ini_set('display_errors', 1);header('Content-Type: image/png');$im = @imagecreate(250, 13) or die('Cannot Initialize GD Image');imageantialias($im, TRUE);$back = imagecolorallocate($im, 255, 255, 255);imagefill($im, 0, 0, $back);$text = imagecolorallocate($im, 0, 0, 0);imagestring($im, 2, 0, 0, ''.$_REQUEST['s'], $text);imagecolortransparent($im, $back);imagepng($im);imagedestroy($im);?>

Request it with something like: http://www.hugedomains.com/domain_profile.cfm?d=asdasf&e=com

 

If you are using Xisto, you can replace every occurance of png with gif as it is using PHP 4.3.9 which supports GIF.

My ISP doesn't, so thats why it has PNG.

A live demo is at

http://forums.xisto.com/no_longer_exists/

 

I have chose to use the pixel-like font which is the best looking out of the built-in ones.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.