An efficient way to show a random value from an array, using PHP’s array_rand() functions.
Standardize string to a strict format
Some file systems don’t accept spaces and make no difference between lowercase and uppercase characters. Also when doing mod_rewrite and you would like to standardize an URL, it’s a good idea (although not always necessary) to remove white spaces and other special characters. This PHP function standardizes a string using a series of function calls and regular expressions.
Extract the file extension using PHP
Extract the file extension of the specified file name / file path using the pathinfo() function.
FTP Connection Using PHP
This sample code shows you how to connect to a remote FTP server using PHP’s built-in functions, retrieve a text file and save it on the current server.
Convert RGB Color Value To Hexadecimal
A simple way to convert RGB colors to their hexadecimal values by using the dechex() function.
Forcing downloads with PHP
The DownloadFile() function will initiate a download from the path that you provided. It works great with large files because it buffers the data, instead of putting the entire content of the file in memory and serving it from there.
Array Of United States Area Codes
An array of 3-digit telephone area codes and the US states that they correspond to.
Generate random password of various strength
This function is a smart password generator, as it allows you to define the length and strength of the password. It also avoids characters that can easily be confused with digits such as lowercase ‘l’ and ‘o’.
A function that formats date and time
The ConvertDateTime() function takes a date and time string in the typical MySQL format (YYYY-MM-DD HH:MM:SS) and formats it as instructed by the formatting string.
Random Password Using PHP
A function that generates strong passwords by mixing uppercase and lowercase characters with numbers.