Algorithms Arrays Passwords Uncategorized
Commerce Uncategorized
Databases Abstraction Layers Informix LDAP MS SQL MySQL ODBC PostgreSQL Uncategorized
Date & Time Calculators Conversion Translation Uncategorized
Discussion Chat Forums Guestbooks Polls Uncategorized
Email Validation Uncategorized
External Uncategorized
Files and Directories Uncategorized
Games Uncategorized
Graphics 3-D Graphs Resizing Thumbnails Uncategorized
HTML Forms Menus & Navigation Source Viewers Tables Templates Uncategorized
HTTP Authentication Cookies File Uploading Uncategorized
I18N Uncategorized
Math Uncategorized
Miscellaneous Uncategorized
Searching and Trees Uncategorized
Security Uncategorized
Text Uncategorized
Utilities Calendars Counters Link Checkers Weather Uncategorized
XML Uncategorized
| php sample source codes |
|---|
|
create buttons on the fly with PHP3 and now also PHP4. <br>variables used: fg:foreground color, bg:background color, txt:text on the button.<br>
<a href="http://www.circle.ch/scripts/" target="_blank">http://www.circle.ch/scripts/</a><br><br><ul><li>
Refer to my other example to see, how fonts can be changed: <a href="http://www.zend.com/codex.php?id=188&single=1" target="_blank">http://www.zend.com/codex.php?id=188&single=1</a></li>
<li>See also the cascading menu using images: <a href="http://www.zend.com/codex.php?id=232&single=1" target="_blank">http://www.zend.com/codex.php?id=232&single=1</a></ul>
|
|
I wrote three basic routines to create an image, draw a frame and add a text-line to the image. most parameters are http-passed; this allows a later inclusion into your html-documents.
have a look!
|
|
Random Image with Link - good for "did you know" type of banner which point people to new areas of a website (at least that's why I made it...)
**** This uses $level from my code for the link level determiner ****
|
|
A simple function to avoid having to specify image height and width when putting an image in a web page. Specifying these parameters helps the browser display pages faster.
|
|
Generate "Mondrian" art randomly.
|
|
When accessed via the tag:
Where $barcode is the string with your
information to be barcoded, it returns a pnd image of the barcode. It creates a barcode39 type barcode.
|
|
This script makes it easy to dynamically
buttons by applying text to images. The text can have different font, color, angle
and background image
|
|
a cascading menu using on-the-fly image creation.<br>inspired by macromedias flash and sun's java you get now another possibility to create<br>dynamical menus.<br><br>thank you zakj, for your <a href="http://www.zend.com/codex.php?id=230&single=1" target="_blank">menu class</a>.
<br>See example:<a href="http://www.circle.ch/scripts/test/button_menu/" target="_blank">Cascading menu</a>.
<br><br>enjoy!
|
|
Takes a hex colour in standard HTML format and returns a three element array in which each element is the decimal R, G, or B value which can then be used, for instance, in GD funcitons
|
|
Class to draw a text message as a PNG graphic. The text message, font, colour, background, size, padding, rotation, and transparency can all be defined via OO interface. Code below can be called as a URL.
|
|
JavaScript and PHP server communication via the document.images object in the html DOM.
|
|
This class allows you to crop an image in a variety of ways. You can crop in an absolute or relative way (to a certain size or by a certain size), both as a pixel number or a percentage. You can also save or display the cropped image. The cropping can be done in 9 different positions: top left, top, top right, left, centre, right, bottom left, bottom, or bottom right. Or you can automatically crop based on a threshold limit. The original image can be loaded from the file system or from a string (for example, data returned from a database.)
The script attempts to auto-detect the GD version, so you should be able to use GD 1.6 and on up.
|
|
This PHP script will display the daily comic from the well-known User Friendly site (www.userfriendly.org).
|
|
Class that utilizes gd library to retrieve image info and preview an image dynamically. Also have a look at the example code
|
|
This code radomly selects and image from a directory and with the aid of META refresh rotates images on a page in a slideshow fashion. The code will function fine without the META refresh enabling a different image to be viewed upon page refresh. The script generates a valid IMG tag including graphic dimensions. Will accept either GIF or JPEG formats. This code should be compliant for both PHP 3.x and PHP 4.x
|
|
Embed Flash swf's in php using a function call from another php file
|
|
ok, well as you may have noticed, imagepstext, and imagettftext do not word wrap. I ended up writing THIS code to combat that, and also to help in ALL my sites. With very little work it can be changed to do lots of cool things with text. This SHOULD work, i dont THINK it is an older copy...
|
|
This function allows you to grab an image from a remote host and write it
into a new file in the local host.
|
|
Creates a html document which resembles a gif file. requires gd.
|
|
Well, I was shifting from GD with GIF to a newer without GIF, but I had one problem. I had to convert about 2000 GIF files into PNG... that was bad. So I did a little code, that did the work for me. It can easily be rewritten so it also can handle etc. JPEG.
|
|
A graphical companion to The <a href="http://www.zend.com/codex.php?id=234&single=1">Anticounter</a>. More silliness.
|
|
Hotlinking protection support from PHP:
This simple script is an easy way to protect your media images or any files for that matter from remote linking which leads to bandwidth theft.
|
|
"Cache" dynamically created images.
|
|
A helpful collection of image processing routines. Some convert between colour spaces and others process the image. This library makes it really easy to change the hue, saturation, brightness, and colour of an image, as well as easily create html hx colour strings, or get the rgb value of a pixel, and more!
Methods include:
getGDVersion(), getPixelRGB(), colourDistance(), hex2rgb(), rgb2hex(), rgb2hls(), hls2rgb(), rgb2hsv(), hsv2rgb(), greyscale(), threshold(), colourise() (also accessible as 'colorize')
Full details of these methods, and examples of use, can be found in the class comments.
|
|
This is a class allows you to apply a mask to an image much like you could do in PhotoShop, Gimp, or any other such image manipulation program.
If the mask is smaller than the image then the mask can be placed in various positions (top left, left, top right, left, centre, right, bottom left, bottom, bottom right) or the mask can be resized to the dimensions of the image.
Because of the nature of the class, masking large images may take some time!
|
|
Inspired by the RSA dolphin and a giant Tux also made of coloured source code.<BR>Turn any png, jpg or gif (if supported by your version of GD) into coloured HTML Text.
|