Home >> Snippet List

PHP Code Snippets

<<first    <prev    1  2  3  (4) 5  6  7  8  9       next>     last>>
  • Easy page browser - An easy page browser class that produces this type of utput: ( prev 6 7 8 9 10 next...
  • Echo 'n' number of words - To get the first 250 words offset you can use phpnet/stripos in a loop like ...
  • Email attachments with PHP mail() - Class to send a file as an attachment with the PHP mail() function...
  • Email w/ attachments class - Class for sending mail with MIME attachments in multipart format using ex...
  • Encrypt and Decrypt without a known key - PHP Function to Encrypt and Decrypt a string without a known ...
  • EVAL a file - Evaluate an external file as a PHP script and get the result as string For example, you'...
  • Export mySQL results to CSV - This script will export the results of a mySQL query to a Comma Separated...
  • Export table to Excel or MS Word file - Export a mySQL database table to an EXCEL file database table ...
  • Extract and Display all links on a web page - Given a URl this code will extract and display all links ...
  • Extract Search Query from Referer - This will extract the search query from a search engine's search Yo...
  • Fake email addresses - Generates lists of fake email addresses Can be used as a spambot trap to poison ...
  • Filter Empty Array Elements - Filters out any empty array elements from the submitted array...
  • Filter non-alphanumeric characters - Filters out all non-alphanumeric characters (a through z and 0 thr...
  • Financial management functions - A suite of financial management functions, including present and futur...
  • Find days between dates #1 - A simple way to find all days between a pair of dates...
  • Find IP from Hostname - This often works better than using gethostbyname() or other native functions:...
  • Find the current URL of the page - Finds the current URL of the page...
  • Fix missing $_SERVER SCRIPT_URL variable - Many scripts rely on $_SERVER[SCRIPT_URL] which is sometimes...
  • Flat file counter - Simple demo of a flat file counter...
  • Format money as millions, billions, etc - This function formats a money amount into an abbreviated form...
  • Forum skeleton code - Very basic skeleton code for a forum Installation: filenamephp?type=setup...
  • FTP via PHP - A lot of people have asked for VERY simple FTP functionality with PHP, so here it is Th...
  • GD barchart demo - This GD barchart demo will display a bar chart based on random values (which you cou...
  • Generate random string - This will return a character based on the give input number All you have to do...
  • Get Absolute Path - It's sometimes necessary to figure out the absolute path to a certain file This sni...
  • Get All Files into an Array - This loads all of the file names in a given directory into an array...
  • GET and POST variables in hidden form - A class to put get and post variables in hidden form...
  • Get Atomic time - This returns the time in the form of a timestamp...
  • Get Current Directory Name - This gets the name of the directory which contains the current script...
  • Get Current Page URL - This will return the URL of the current page or script Works with HTTP and HTTPS...
  • <<first    <prev    1  2  3  (4) 5  6  7  8  9       next>     last>>