recent searches:
include functions ,
variable functions ,
post functions...
If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.
PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.
Writes the given text into the image using TrueType
fonts.
imageAn image resource, returned by one of the image creation functions, such as imagecreatetruecolor().
sizeThe font size. Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2)
angleThe angle in degrees, with 0 degrees being left-to-right reading text. Higher values represent a counter-clockwise rotation. For example, a value of 90 would result in bottom-to-top reading text.
x
The coordinates given by x and
y will define the basepoint of the first
character (roughly the lower-left corner of the character). This
is different from the imagestring(), where
x and y define the
upper-left corner of the first character. For example, "top left"
is 0, 0.
yThe y-ordinate. This sets the position of the fonts baseline, not the very bottom of the character.
colorThe color index. Using the negative of a color index has the effect of turning off antialiasing. See imagecolorallocate()
fontfileThe path to the TrueType font you wish to use.
Depending on which version of the GD library PHP is using, when
fontfile does not begin with a leading
/ then .ttf will be appended
to the filename and the library will attempt to search for that
filename along a library-defined font path.
When using versions of the GD library lower than 2.0.18, a space character, rather than a semicolon, was used as the 'path separator' for different font files. Unintentional use of this feature will result in the warning message: Warning: Could not find/open font. For these affected versions, the only solution is moving the font to a path which does not contain spaces.
In many cases where a font resides in the same directory as the script using it the following trick will alleviate any include problems.
<?php |
textThe text string.
May include decimal numeric character references (of the form: €) to access characters in a font beyond position 127. The hexadecimal format (like ©) is supported as of PHP 5.2.0. Strings in UTF-8 encoding can be passed directly.
Named entities, such as ©, are not supported. Consider using html_entity_decode() to decode these named entities into UTF-8 strings (html_entity_decode() supports this as of PHP 5.0.0).
If a character is used in the string which is not supported by the font, a hollow rectangle will replace the character.
Returns an array with 8 elements representing four points making the bounding box of the text. The order of the points is lower left, lower right, upper right, upper left. The points are relative to the text regardless of the angle, so "upper left" means in the top left-hand corner when you see the text horizontally.
Another Useful functions:
ref.image | haru.haruimage | function.ps-place-image | function.ps-open-memory-image | function.ps-open-image | function.ps-open-image-file | function.ps-close-image | function.pdf-place-image | function.pdf-open-memory-image | function.pdf-open-image | function.pdf-open-image-file | function.pdf-load-image | function.pdf-get-image-width | function.pdf-get-image-height | function.pdf-fit-image | function.pdf-fill-imageblock | function.pdf-close-image | function.imagick-writeimages | function.imagick-writeimage | function.imagick-set-image-quality | function.imagick-set-image-comment | function.imagick-readimage | function.imagick-newimagelist | function.imagick-ispaletteimage | function.imagick-isopaqueimage | function.imagick-ismonochromeimage | function.imagick-isimagesequal | function.imagick-isgrayimage | function.imagick-image2blob | function.imagick-getimagetype | function.imagick-getimagefromlist | function.imagick-getimagedepth | function.imagick-blob2image | function.imagexbm | function.imagewbmp | function.imagetypes | function.imagettftext | function.imagettfbbox | function.imagetruecolortopalette | function.imagesy | function.imagesx | function.imagestringup | function.imagestring | function.imagesettile | function.imagesetthickness | function.imagesetstyle | function.imagesetpixel | function.imagesetbrush | function.imagesavealpha | function.imagerotate | function.imagerectangle | function.imagepstext | function.imagepsslantfont | function.imagepsloadfont | function.imagepsfreefont | function.imagepsextendfont | function.imagepsencodefont | function.imagepsbbox | function.imagepolygon | function.imagepng | function.imagepalettecopy | function.imageloadfont | function.imageline | function.imagelayereffect | function.imagejpeg | function.imageistruecolor | function.imageinterlace | function.imagegif | function.imagegd2 | function.imagegd | function.imagegammacorrect | function.imagefttext | function.imageftbbox | function.imagefontwidth | function.imagefontheight | function.imagefilter | function.imagefilltoborder | function.imagefilledrectangle | function.imagefilledpolygon | function.imagefilledellipse | function.imagefilledarc | function.imagefill | function.imageellipse | function.imagedestroy | function.imagedashedline | function.imagecreatetruecolor | function.imagecreatefromxpm | function.imagecreatefromxbm | function.imagecreatefromwbmp | function.imagecreatefromstring | function.imagecreatefrompng | function.imagecreatefromjpeg | function.imagecreatefromgif | function.imagecreatefromgd2part | function.imagecreatefromgd2 | function.imagecreatefromgd | function.imagecreate | function.imagecopyresized | function.imagecopyresampled | function.imagecopymergegray | function.imagecopymerge | function.imagecopy | function.imageconvolution | function.imagecolortransparent | function.imagecolorstotal | function.imagecolorsforindex | function.imagecolorset | function.imagecolorresolvealpha | function.imagecolorresolve | function.imagecolormatch | function.imagecolorexactalpha | function.imagecolorexact | function.imagecolordeallocate | function.imagecolorclosesthwb | function.imagecolorclosestalpha | function.imagecolorclosest | function.imagecolorat | function.imagecolorallocatealpha | function.imagecolorallocate | function.imagecharup | function.imagechar | function.imagearc | function.imageantialias | function.imagealphablending | function.image2wbmp | function.image-type-to-mime-type | function.image-type-to-extension | function.harupage-drawimage | function.haruimage-setmaskimage | function.haruimage-setcolormask | function.haruimage-getwidth | function.haruimage-getsize | function.haruimage-getheight | function.haruimage-getcolorspace | function.haruimage-getbitspercomponent | function.getimagesize | function.exif-imagetype | function.cpdf-place-inline-image |
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.