PHP Sample Code
-
Create Hashes - MD5, SHA1, SHA256, SHA384, SHA512
by David Cumps
In PHP its a simple task to generate hashes, but in C# it takes a little more work. We'll create a Hash class to simplify the process.
-
Executing a .CS file
by David Cumps
Demonstrates how to write a C# program that can "launch" a .cs file and execute it.
-
Storing / Retrieving pictures from database
by Imthiaz Rafiq
This sample code demonstrates how to save and retrieve pictures from a database using PHP.
-
PHP Port Scanner
by Gringod
An object-oriented port scanner class. Can be used for scanning any number of ports on a range of ip-addresses. Useful for checking you network for un-authorised webservers or possible trojans.
-
Get metadata on MySQL databases
by Edward Tanguay
An example of how to get metadata - such as all the databases on the server, all of their tables, and the corresponding field information for that table.
-
How to create XML files
by Edward Tanguay
How to generate XML files in PHP using its new_child function.
-
Determine execution time in PHP
by Gringod
This is based on the ASP script posted by Lio. It will determine the time taken for a php script to execute correct to 0.000000000000001 seconds.
-
Getting Started with Database Programming
by gigsv00
This is a conceptual idea of how I start to do database programming. In this article, I had highlighted a few points that become vital to understand for any new comers to do database programming.
-
Domain scanner
by Akas Triono Hadi
This simple code gets a list of domains with a certain extension from google.com
-
Total size of a directory
by Alt-PHP-Faq
How to calculate the total size of a directory from a PHP script
-
Output number with leading zeros
by Alt-PHP-Faq
How to output a number with leading zeros
-
Accessing COM objects from PHP
by Alt-PHP-Faq
How to load a Windows COM object from a PHP script
-
Replace only the first occurance in a string
by Alt-PHP-Faq
How to replace only the first occurance of some text in a string
-
Determine if a variable is numeric
by James Crowley
How to determine if the contents of a variable is numeric