A fully functional chess game in Java, without an AI or disallowing moves that are considered to be illegal according to the rules of chess.
Basic file based hit counter
Very basic hit counter based on a plain text file, built using PHP.
Find out where a TinyUrl.com url points to
This PHP source code uses sockets to retrieve the URL that TinyUrl.com points to, without you having to actually access the URL.
List the content of a directory/folder using PHP
With a few lines of code and a while loop you can list the content of a directory on both Unix and Windows machines.
Calculate the age in years using PHP
A PHP CalculateAge() function created by applying the logic we used previously in C# to calculate the age from a given birth date.
Write a string to a file
This example shows you how to write a string to a file using PHP, and also do some error handling to ensure that your file gets written correctly.
Check if a string ends with another string
A short function that checks whether a passed string ends with another passed string, and returns the answer as a boolean value.
Redirect using PHP
A function that redirects the user to the specified URL by sending the appropriate headers or by using JavaScript if the headers were already sent.
Read content of file or URL into a string
Two examples on how to read the content coming from an URL or from a local file into a string, using PHP.
Parsing a Tab Delimited File
This example code shows you how to parse a tab delimited file (or any other character delimited file for that matter), using PHP.