ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

13
Date Submitted Fri. Oct. 6th, 2006 9:25 AM
Revision 1
Helper BrandonReese
Tags PHP | phpcode
Comments 4 comments
This is a class for generating HTML tables. It's kind of rough, but I thought somebody might want to do something with it.
-12
Date Submitted Thu. Sep. 28th, 2006 3:43 PM
Revision 1
Helper ffxfiend
Tags "php" | PHP | phpcode | RegExp
Comments 1 comments
This is a faily simple function to validate a URL being passed into your scripts. It will allow for http, https, and ftp. The beginning www. of a URL is optional as well. It will also validate if you have an IP address in place of the domain name. I'm sure this can be improved upon as this is my first attempt at regular expressions but it has worked good for me so far. Please comment or improve if your able.

Thanks!
27
Date Submitted Fri. Sep. 22nd, 2006 7:06 AM
Revision 1
Helper ffxfiend
Tags "Random Generation" | PHP | phpcode
Comments 5 comments
This is a simple function to generate a random ID of letters and numbers however long you want. All you do is pass it how many parts you want and then how many pieces(chars/numbers) per part you want.

I hope you enjoy
12
Date Submitted Sun. Sep. 17th, 2006 9:05 AM
Revision 1
Helper ffxfiend
Tags "images" | PHP | phpcode
Comments 3 comments
You can use this function to dynamically generate html "width/height" for use with displaying a thumbnail image usingthe original image. This will help save in making dup images just for display as a thumbnail.

It takes two arguments, the path to where the image is stored and the desired width or height.

Please comment or improve this code .
9
Date Submitted Fri. Aug. 25th, 2006 3:58 AM
Revision 1
Helper Cyber-Drugs
Tags ??? | mysql_escape_string | phpcode
Comments 0 comments
The below may be a simple line of code, but it is extremely useful to help prevent SQL Injection. There are many other methods, such as removing certain values from your string, but this is by far superior, as it does not limit what can be inserted to your database.
5
Date Submitted Fri. Aug. 25th, 2006 3:55 AM
Revision 1
Helper Cyber-Drugs
Tags ??? | phpcode
Comments 0 comments
Before any wars start, I want to clarify that the code below is NOT my own code, but unfortunately I am uncertain where I obtained it from. The code below basically create dynamic thumbnails of an image, you parse the following to it:

Image location,
Maximum Width
Maximum Height

It will then scale your image down, please do not confuse this with converting your image into a square, or whatever shape you are after. The code below will maintain aspect ratio of your image, and will use the values you parse as a guidline. Extremely handy when you are building gallery websites.
5
Date Submitted Fri. Aug. 25th, 2006 3:50 AM
Revision 1
Helper Cyber-Drugs
Tags ??? | die | if | mysql_connect | mysql_error | phpcode
Comments 0 comments
Below is a very simple bit of code you can use to test a MySQL Database Connection.
2
Date Submitted Fri. Aug. 25th, 2006 3:44 AM
Revision 1
Helper Cyber-Drugs
Tags ??? | function | implode | phpcode | return | unset | while
Comments 0 comments
Below is a bit of code, which I needed to make when creating an application which did a lot of file manipulation. If you ever want to load the contents of a file, but remove X amount of lines from the end of the file, use the function below.
1
Date Submitted Fri. Aug. 25th, 2006 3:41 AM
Revision 1
Helper Cyber-Drugs
Tags ??? | else | function | if | phpcode | return
Comments 0 comments
The below is an old bit of code I threw together when I was developing a Friend Networking site back in 2001. The site didn't last all that long, but I did manage to save all the handy snippets I used in it.

Below is code, which will return the age of somebody, when you parse their date of birth to it. I will probably make a cleaner version of the code at a later date and share it with everyone here.