Authorize.net Class
13
I needed to send an email through an authenticated SMTP server. I found the snippet on the PHP website to do the trick.
13
Generate a random number or string in PHP.
12
This function is useful in helping to deter spam bots by obfuscating things such as e-mail addresses and URLs that are displayed on a web page. While it's not 100% fool proof, it does offer some protection.
Example:
$email = html_entitize('foo@baz.org');
/*
Outputs foo@baz.com
*/
Example:
$email = html_entitize('foo@baz.org');
/*
Outputs foo@baz.com
*/
12
Generates select boxes, text boxes, check boxes and radio buttons. Via a handful of functions.
12
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
Here's a little snippet I got from SitePoint that I now use all the time. Add the code below to the start of each script.
Basically, what this does is checks to see if magic_quotes_gpc() is enabled on the server, and if it is, then it gets rid of all the slashes that magic_quotes_gpc() adds to input from $_GET, $_POST and $_COOKIES globals.
It's a good snippet to use, because it negates the bad programming practices that having magic_quotes_gpc() lets you get away with, and means that you don't really on PHP to validate your input; you get to do it all yourself ;-)
Basically, what this does is checks to see if magic_quotes_gpc() is enabled on the server, and if it is, then it gets rid of all the slashes that magic_quotes_gpc() adds to input from $_GET, $_POST and $_COOKIES globals.
It's a good snippet to use, because it negates the bad programming practices that having magic_quotes_gpc() lets you get away with, and means that you don't really on PHP to validate your input; you get to do it all yourself ;-)
12
Over the summer, I worked on a project in which I needed to parse logfiles which were in the following format:
IP|USE|TIME>IP2|USE2|TIME2>
and so on.
When I parsed them to display the log file in a user-friendly fashion, I used the following code:
IP|USE|TIME>IP2|USE2|TIME2>
and so on.
When I parsed them to display the log file in a user-friendly fashion, I used the following code:
12
Here is an easy calendar!
Hope you like it dude =)
Hope you like it dude =)
12
With this function you can calculate the age of a person
Example:
echo "Age is: " . age("1984-07-05");
Result will be (23 Feb 2005) = "Age is: 20"
Example:
echo "Age is: " . age("1984-07-05");
Result will be (23 Feb 2005) = "Age is: 20"
12
Don't know if anyone will find this handly, but here's a CSS processor that I wrote that allows me to nest CSS Blocks, and various other things, making for an easier to maintain CSS file.
Warning: I'd recommend caching the results since I didn't have a need to optomize it for speed.
Things that it includes:
*Nested CSS Rules
*Removes Whitespace
*Allows for // comments
*Removes comments (so put them in at no cost)
Please let me know what you think
Warning: I'd recommend caching the results since I didn't have a need to optomize it for speed.
Things that it includes:
*Nested CSS Rules
*Removes Whitespace
*Allows for // comments
*Removes comments (so put them in at no cost)
Please let me know what you think









