Anti-SQL Injection
17
The recursive function stripslashesDeep($value) will (upon called) strip slashes (\) from strings and arrays (even arrays with arrays within themself). The controlstatement (if) checks if magic quotes gpc is on, if it is we strip the slashes it have added.
Very good snippet if you want to have the "same" input even if you switch to an enviroment where magic quotes gpc is set to something else than on your originall server.
Very good snippet if you want to have the "same" input even if you switch to an enviroment where magic quotes gpc is set to something else than on your originall server.
18
This snippet will undo all the nasty stuff which happens when you set register_globals to on in your php.ini file.
(Originally found in the code of Wordpress).
(Originally found in the code of Wordpress).
15
This litle snippet shows how to store passwords and then check inputed passwords if they are correct.
(In this snippet we use som pseduo code for the database connection).
(In this snippet we use som pseduo code for the database connection).
16
A small function to help you debug your PHP scripts (with the debug modell, output as much as possible to see where the script fails).
4
This is a little script I wrote that copies your database through a cfquery statement
Enjoy,
Ernie
ernest.breau@gmail.com
Enjoy,
Ernie
ernest.breau@gmail.com
15
A small recursive php function to determine the size of a directory by adding all it's contents together and returning them as an integer.
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
*/
8
This little tool is pretty useful for administrators who wear the hat of both system admin and DBA on Linux/MySQL boxes. I wrote it as kind of a joke for our Perl developers, but now I use it just about every day for everything from at prompt hackups to full on table space utilization monitoring scripts.
The snippet has the library script that you can source into scripts that actually do work, as well as a script that uses the functions in the libraries. Anyone who has used the C API should be able to relate to using this script.
It's pretty fast and lightweight. It makes only one external call to mysql and sed per query. The rest is all bash builtins. Requires bash > 3.0
The snippet has the library script that you can source into scripts that actually do work, as well as a script that uses the functions in the libraries. Anyone who has used the C API should be able to relate to using this script.
It's pretty fast and lightweight. It makes only one external call to mysql and sed per query. The rest is all bash builtins. Requires bash > 3.0
6
A database API written in Perl for a MySQL.
You will need to edit the settings for your server.
Enojy
You will need to edit the settings for your server.
Enojy









