Alternate table row colors with php
Function to output all 256 ascii characters
Logs all hits in the format: day, date, time, ip, browser and referer to a text file
Simple function to check if a value exists in a database, most useful from a form.
Making a connection to your mysql database using php
Echo all files in a particular directory
This is a simple directory search i wrote for here to search the php manual, it will search the filenames in the directory, not the files themselves
Count the total number of files in a directory
simple code using explode();
Echo all folders in a particular directory
Highlight PHP Syntax
Display the number of hits to your website
Basic format to send a HTML email
to check if code contains <html> tags it will go true if it contains anything like <something>
A quick example of IF and GET,
Log visitors ips and time/date of visit in a simple text file
Display the last 5 referers to your site on your homepage
An easy way to return the number of lines in a file
Basic script to check if a link (url) is valid
Splitting an amount of MySQL data onto multiple pages.
Manages the output of nested quote strings.
Display "this page was generated in x.xxxx seconds" on your pages
Check if a certain site or server is up by opening a simple socket
Random Image script
Display a link or line of text from a selection at random
Function to generate a random alphanumeric password
Simple function to return the extension of a file, suitable for just filenames, not webpath/filename
file reversal code.. good for tagboards.
Shows people thier IP
An easy way to get your full server path when installing php scripts
Tells you when your friends have birthday!
Quick example of how to split a number into two values using substr()
For people using the switch function for their pages like ?page=blah, if you have alot of pages this is a much shorter way to include them as they are called
Another switch replacement example.
A selection of examples for displaying time & date
Function to check an email address is a valid format
Deny access to a specified IP, allows you to use * wildcards, to help stop people who's ip's change each time they reconnect
A simple snippet so visitors can add your site to their favorities
Pop up a message alert box for your visitors, that they only see on the first visit
This will block the "done but with errors on page" message that you sometimes get on the statusbar
Stop your website getting trapped in a frame (forces the window ontop)
Simple function to loop through a number of radio buttons in a form to see if one is checked
Allows you to use a custom mouse cursor on your site
This lets you add an extra button to the top menu bar, so you can add a button to link to your website homepage, chatroom or whatever
Redirects guests on your proboards forum to the register page, this is a heavily modified version of a non-working code i found at support.proboards.com (place in your main header)
Ability to hide and show elements of a html page.
A basic html mail/contact form layout
Let visitors refresh your page from a button, usefull if you display some random content
Code to play an mp3 file as background music on your site
Create a simple popup window, you can easily edit the size and other attributes
Put this code in your page, and you will goto one of 3 pages you assign
Automatically redirect people to a certain page when the visit another
This mod can display your rules thread in a popup window when a new user clicks the registration page
Let visitors set your site as their default homepage
When you click an assigned button, it shakes your browser and everything on the page
Use this for collapsible menus or any content you want to show/hide from a link
Display the current time & date on your website
Pop up the source of the page from a link. (IE/Mozzila)
When the page loads make a window popup.