Tag Cloud for MovableType





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

15
Date Submitted Mon. Oct. 9th, 2006 9:57 PM
Revision 1
Helper inxilpro
Tags Convert | CSV | PHP | XML
Comments 1 comments
This function converts a CSV file to a simple XML file.
15
Date Submitted Mon. Oct. 9th, 2006 3:13 PM
Revision 1
Helper inxilpro
Tags classes | Database | DB | PHP | Simple
Comments 5 comments
This is a bare-bones DB connectivity class. It's really just meant to abstract a few basic mysql_ functions so that if you ever have to change DBs you don't have to change every database function call.

I really just threw this together on a whim with no testing what-so-ever. Also, it only abstracts the most basic MySQL functions--this is intentional; please expand it as you see fit.
16
Date Submitted Mon. Oct. 9th, 2006 2:58 PM
Revision 1
Scripter wiz1705
Tags Array | PHP | XML
Comments 1 comments
I've seen XML 2 Array functions done in other ways but this is the shortest implementation I've seen yet. I didnt write it myself though, but I thought I'd submit it for common good of this site. It uses regex and works prefectly.
15
Date Submitted Mon. Oct. 9th, 2006 2:49 PM
Revision 1
Scripter wiz1705
Tags classes | PHP | plugins
Comments 0 comments
Basic internal class loading for PHP. Could make some plugins with this code if used properly.
17
Date Submitted Mon. Oct. 9th, 2006 2:16 PM
Revision 1
Beginner adorkable81
Tags Database | PHP
Comments 2 comments
Database Class with quick connectivity and useful database functio
14
Date Submitted Mon. Oct. 9th, 2006 10:09 AM
Revision 1
Helper inxilpro
Tags debug | HTML | PHP | Variable
Comments 2 comments
Here's a basic function for debugging any kind of PHP variable. It allows for "invisible" or "visible" output--that is output in HTML comments or within visible HTML tags. It also supports customizable "containers" which lets you easily edit the look of the visible and invisible blocks. Examples in code below.
12
Date Submitted Mon. Oct. 9th, 2006 8:18 AM
Revision 1
Helper shell
Tags PHP
Comments 1 comments
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:
-12
Date Submitted Mon. Oct. 9th, 2006 7:29 AM
Revision 1
Helper BrandonReese
Tags MD5 | Password | PHP | Random
Comments 5 comments
This is a quick and easy method to generate a somewhat random password. This simply generates the MD5 hash for the integer returned by the time() function and then truncates it to the specific length.
-17
Date Submitted Mon. Oct. 9th, 2006 7:07 AM
Revision 1
Helper serpentskiss
Tags PHP
Comments 3 comments
A little function that does some basic checking for data input by a user. Should get rid of code injection ;-)
12
Date Submitted Mon. Oct. 9th, 2006 7:04 AM
Revision 1
Helper serpentskiss
Tags PHP
Comments 2 comments
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 ;-)