List all IP v4 addresses of the server/machine where script is executed. It works on Windows, Ubuntu and MacOSX
This short tutorial will demonstrate how to convert a static CSS style sheet to a dynamic style sheet.
Converts the NASA SRTM-Data in .hgt-Format to ASCII .csv in the Format lat;lon;ele for easier import into databases. All .hgt-files are expected to be in a subdirectory relative to the script named "hgt". Save as converthgt.php, then run in console / command line: php converthgt.php > srtm.csv This will produce a large csv-file from all the .hgt-files in the hgt-subdirectory. The data is grouped by filename with a two-line grouping header.
This script allows adding first and last name to a file (users.log) and then just read it out to the screen. It can be used for creating a guest book without a database.
Scope of isSharedInternet function is to determine whether client is using shared internet or not.
_viewAggregate() function aggregates an array of IP addresses or networks according to supplied prefixes and their mask lengths. ip2long6() and long2ip6() function are taken from comments of online php manual and given there for ease of use. See http://php.net/ip2long
Search a body of text for the most common words
This is I think a cleaner way to handle generating a list of selection options. The only thing that needs to be done to add or remove a country is to modify the countries array.
Function that creates the options for a selection list of countries. Takes input of selected country and sets the option to selected. If nothing else, this should save others a bunch of typing and copy&paste.
This snippet just reads the whole site in a string.
The purpose of this is pretty simple. Pass it an array with header values and an array of data and it'll create a simple table like spreadsheet. The benefit of this over PHPExcel is that it's smaller and more simple but also that it's not restricted by the number of rows you use. I've had PHPExcel choke on a couple thousand of rows but this will handle them fine. It uses SQLite to store the data in memory before writing to file. So, you must have the SQLite extension turned on. I'm planning on a more robust one that handles individual cells and formatting and such but starting here since I use this kind of thing to dump reports and tables.
This function returns a list of unique random items in an array.
This script will be used to mail someone from your code
This checks to see if two strings match each other.
if one visits for the first time, it says welcome. otherwise it gives the visit number and says when the user was on the site last time.
This simple function can build XHTML tags for you really quickly
Take a valid string URL with get variables, so they can be accessed using php's P\predefined GET variables or just return an array
Creates a thumbnail image when a photo is uploaded to your site.