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 |
|---|
|
This is a Bubble Sort function for sorting an array. It takes two parameters, the array to be sorted, and an integer. If the integer is non-zero, the array output will be sorted in reverse numerical order. The output is the sorted array.
Code is a modified (but working) version of BubbleSort v1.0 written by "skizz" found on phpbuilder.net
|
|
Checks validity of Israeli interim ID number (teudat zehut) using algorithm described in http://www.halemo.com/info/idcard (the link in Hebrew).
|
|
Calculates the checkdigit, cdv 10, for
either a integer or string value.
Cdv10 are often used in account-numbers etc.
|
|
chopSent is very simplistic script/function intended to limit the character output of a given string and emphasize that the string does indeed continue, however input source is NOT limited, so use your imagination.
|
|
Convert IP string (XXX.YYY.WWW.ZZZ) to integer
|
|
Shows the steps involved in converting a number from a given base to base 10.
I wrote the example for a book, but after I was mostly finished it, it seemed too off topic. I hope that someone finds it useful. :)
|
|
Function that calculates the CRC check sum of the given file.
This will help you to write a file download script for EzWeb(a famouse WAP service in Japan).
|
|
Below are two functions I use to create unique ids:
The first uses unique_id() and md5(). (I think I copied it from the manual).
The second is useful if you want to restrict the unique id to a specific
length and character set ( I think I copied it from Core PHP).
|
|
This class returns the whois information an checks the availability of at least 250 different top level domains.
Also it validates the domains name (Thought have been given to the new IDN special chars). CNO WHOIS informations where returned completely.
|
|
This runs as a cron job and notifies the administrator of all the php fatal errors that happened in the last specified time.
This is a low-overhead solution to fatal error reporting.... some solutions suggested output buffering each page, running a regex, but that has huge overhead. Others say no production code should ever have fatal errors. However, in my business we maintain many different sites each low budget and testing may not always be efficent. Sometimes a change on one file affects our code in more than one place and we forget to look somewhere and fatal errors happen. This has saved our butt a few times.
|
|
Just a quick fuzzy logic algorithm I whipped up out of some C code for a project I am working on.
|
|
easy function to convert hexdata to bindata. It's very good to use decode mcrypt hexdata.
|
|
Convert integer to IP (XXX.YYY.WWW.ZZZ)string
|
|
Computes the shortest distance between 2 points (locations) on the earth surface given the Latitude/Longitude.
|
|
this class i made when i learning data structure and algorithm . linked list usually made from
compiled programming language or programming language that have Pointer. but i try to make linkedlist using PHP nothing diference . this class implements single linked list that just have one pointer (next).
this class can use to make stack or queue using linkedlist
more info please contact me
|
|
Simple customisable (colors, fonts etc) calendar.
Dates are clickable to navigate to a schedule or events for any day in the current month.
|
|
Distance in miles between two lan/lon pairs. Uses spherical geometry.
|
|
This code solves the "numbers game", a popular UK television show. It is a winner of the Codewalkers PHP Coding Contest. See example URL for more info.
|
|
The query builder builds a query as per the previous HTML page selections
/* previous HTML page */
create an html page with multiple select boxes (multiple select) and put three radio buttons as for operators (and, or , none). As per the users selection the query will be generated on this page.
This tools uses a fixed query string and also an array. All the conditions are pushed into an array.After the conditions are decided the arroy is converted into a ',' comma separated string containing the conditions.
here $access is a variable through which we control the access to the system
|
|
A very easy to use RC4 function, written entirely in php, using the function on plaintext returns the Encrypted string and using it on encrypted text returns the plaintext... its that simple. The security of the algorythmn is dependant on the size of the key used and any size key can be used with this function.
|
|
This script came first place in the PHP-Editors.com PHP Programming Contest (Pizza Dude).
The script find the shortest route to multiple destinations using a single and double route path.
|
|
This is a winner of the PHP Coding Contest at Codewalkers.com. This program will play the game of trilite.
|
|
Its Generating a simple Turing Number with background image,place the mouse over the image if the number is not clear
|