Library code snippets tagged with php
-
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.
-
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 altphpfaq
How to calculate the total size of a directory from a PHP script
-
Output number with leading zeros
by altphpfaq
How to output a number with leading zeros
-
Accessing COM objects from PHP
by altphpfaq
How to load a Windows COM object from a PHP script
-
Replace only the first occurance in a string
by altphpfaq
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