This function will take an image and create a thumbnail.
This function takes a name, and creates initials, such as "Billy Bob" to "B.B."
This function will calculate the difference in length between two strings.
A simple tutorial of how to connect to a database.
This Snippet will check and see if if a user is logged in or not.
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
This function will check a string to see if it contains any HTML in it.
Creates a thumbnail image when a photo is uploaded to your site.
This function will check any number to see if it is a prime number or not!
Tries to make out of the given string a xhtml-compatible string, that means that the return-string could be wrapped within a xml.
Countries of the European Union add an hour to the time during summer to better seize sunlight, so for several months GMT 0 becomes GMT +1, GMT+1 becomes GMT-2 and so on. This is known as Central European Summer Time (CEST). This script takes a Unix timestamp and adds an hour to it (3600 seconds) if we are in this summer period.
This is based on php's isset() function. So instead of doing like this if (($var1 != "") && ($var2 != "") && ($var3 != "") && ($var4 != "")) we can use if (!empty_str($var1,$var2,$var3,$var4))
A easy way to create simple INSERT / UPDATE query's to MySql In the scrip change the value for $url, $dbuser and $pwrd
I was working on a advert site for a buddy, and needed to get the traffic's country code. This retrieves data (JSON format) and decodes it to get the user's country. If json_decode works on your server, you can remove json_decoder function, and change $json_Co=json_decoder($getCo); to $json_Co=json_decode($getCo);
Count the words typed using exlpode function
Simple Country list generator (Optin list or Unordered list)
Stops PHP from sending a fresh version of an image if the browser already has it in its cache.
checks the week day of my birthday depending on the year I specify
Generate a file cache, this is usually good for your database especially on content that doesn't change often.
I, jarno, wil teach you how to inplement my cms in your website. Questions: replie to this snippet Sorry for my bat englishbut i'm a belgian and i'm just fourteen years old
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.
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.