Code Library
PHP Code
Basic Site Stats
2,840 Views
Logs all hits in the format: day, date, time, ip, browser and referer to a text file
Check Database Value
1,782 Views
Simple function to check if a value exists in a database, most useful from a form.
Directory Search
1,791 Views
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
Hex Colour Table
1,462 Views
This was a javascript function that i found ages ago, but the W3C validator didn't like it, so i re-wrote it in PHP, no idea who made the original one. It's the same as the colour table used here.
Html ereg
1,552 Views
to check if code contains <html> tags it will go true if it contains anything like <something>
Return File Extension
1,312 Views
Simple function to return the extension of a file, suitable for just filenames, not webpath/filename
Switch Function Replacement
1,638 Views
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
Wildcard IP Deny
1,854 Views
Deny access to a specified IP, allows you to use * wildcards, to help stop people who's ip's change each time they reconnect
JavaScript Code
Alert Once Box
1,590 Views
Pop up a message alert box for your visitors, that they only see on the first visit
Block Errors
1,434 Views
This will block the "done but with errors on page" message that you sometimes get on the statusbar
Break Out Of Frames
1,415 Views
Stop your website getting trapped in a frame (forces the window ontop)
Check Radio Buttons
1,471 Views
Simple function to loop through a number of radio buttons in a form to see if one is checked
Email encode
1,539 Views
This javascript will encode an email however still let mailto: work with it :)
Extra Button(Proboards)
1,695 Views
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
Guest Redirect(Proboards)
1,367 Views
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)
Page Refresh
1,519 Views
Let visitors refresh your page from a button, usefull if you display some random content
Popup Window
1,651 Views
Create a simple popup window, you can easily edit the size and other attributes
Rules Popup(Proboards)
1,253 Views
This mod can display your rules thread in a popup window when a new user clicks the registration page
Shake Browser
1,494 Views
When you click an assigned button, it shakes your browser and everything on the page
Show And Hide Content
1,860 Views
Use this for collapsible menus or any content you want to show/hide from a link


