Use this handy function to sort strings based on the day of the week. A normal sort will put the values in alphabetical order but this sort will put them in the order of the days of the week: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday.
A class for getting a visitors' IP address, country name, and 2-3 letter country codes, and displaying the country's flag. It covers 243 countries. It is easy to merge into an existing webpage using only a few lines of PHP code. Currently there are four different database versions available: MySQL, PHP, CSV and XML.
This class can be used to generate music scales and chords. It applies music theory to generate scales and chords by names based on interval patterns between notes. The class can generate scale and chord notes by name and type, transpose scales, transpose chords, generate all chords and scales containing certain notes and more.
This class can be used to list and manage details of cPanel hosting accounts. It can establish a secure connection to a cPanel server and enumerate, create and remove email and FTP accounts, domains, email forwarders and auto-responders, and databases, as well as change passwords, quotas, and cPanel settings.
A class for user agent string analysis. It provides information on a client's software type (browser, webcrawler, anonymizer, etc.) and which OS is being used. It is fast and standalone. Its data file and cache are automatically updated from a remote server with version checking.
This class allows you to easily add a madlibs game to your website. You can load the madlib stories via the file system or a database. The stories are chosen at random and a form will be shown to the user to fill in their own words. You can use a few CSS styles to control how things look.
A collection of 19 tips on manipulating PHP strings. Clear answers are provided with tutorial exercises on string functions including strlen, trim, substr, chop, strpos, strcmp, split and more.