Navigation :

Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links




Site Sponsors :

Bookmark :

Links :

dvd information
domain names
gambling sites

Downloads :

Misc :

Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming

Valid XHTML 1.0 Transitional


Valid CSS!


image_string example

image_string example

<?php
Header("Content-type: image/jpeg");
//width and height of image
$width = 468;
$heigth = 60;
$image = ImageCreate($width,$heigth);
//black background
$black = ImageColorAllocate($image,0,0,0);
//for the text
$white = ImageColorAllocate($image,255,255,255);
/*
parameters for imagestring:
1: resource image, in this case $image
2: font, 1 to 5 are built in fonts in this case 3
3: int x, x co-ordinate in this case 10
4: int y, y co-ordinate in this case 20
5: string s, the string to be displayed in this case "hello world"
6: int col. the color to display the text in, in this case the variable $white
*/
imagestring($image,3,10,20,"Hello World",$white);
//output jpeg
ImageJpeg($image);
//clean up
ImageDestroy($image);
?>