Simple Error Class





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

« Previous 1 2 3 4 5 6 7 8 9  ...  12 13 Next »
-34
Date Submitted Thu. Jul. 27th, 2006 9:53 PM
Revision 1
Beginner registered99
Tags PHP
Comments 1 comments
Php Things
-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 ;-)
-15
Date Submitted Thu. Oct. 12th, 2006 3:28 PM
Revision 1
Beginner ammonkc
Tags Anti-Injection | Injection | mysql | PHP | SQL
Comments 5 comments
Anti-QSL Injection. I'm sure it could be better, so any improvements are welcome.
-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.
-11
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!
-9
Date Submitted Sat. Oct. 14th, 2006 6:26 AM
Revision 1
Beginner hax
Tags PHP
Comments 2 comments
By this class you can make a RSS FEED page in your website.
-8
Date Submitted Tue. Nov. 7th, 2006 11:06 AM
Revision 1
Helper kahotep
Tags mysql | PHP
Comments 6 comments
This class is a simple authentication scheme which makes it easy to add authentication to any page by including one class and adding one table to your MySQL database.

The following functions are employed by this authentication class:

auth()
this is the default constructor; it automatically checks for the POST vars "username" and "password", it also checks to see if the user passed the GET variable "logout", which would prompt it to set the authentication status to un-authenticated.

is_authorized()
Checks the SESSION variable "authorized" and returns true or false depending on that variable.

mysql_bind()
This is automatically called by the constructor each time the class is instantiated and $_POST['username'] and $_POST['password'] are present. It queries the db for a valid username and MD5 encoded password.

user_create($username,$email,$password)
Creates a user, if the username is available, and creates an MD5 hash based on username, password and date, to be used in the "activation" of the account.

user_activation_message($username)
Sends the custom activation message to the email address for the username specified

user_activation($activation_hash)
Checks to see if the activation hash is valid, if it is, the activation_hash variable is set to NULL, thus signifying that the account is active.

user_password_change($username,$password_old,$password_new)
Quick and easy way to change the user's password with one function call.

user_logout()
Sets the authorization status in $_SESSION['authorized'] to FALSE

is_username_available( $username )
Returns TRUE or FALSE depending on whether or not the username is free.
-6
Date Submitted Thu. Mar. 1st, 2007 3:56 PM
Revision 1
Helper mjlintz
Tags PHP
Comments 5 comments
Get the count of records from DB
-5
Date Submitted Sat. Mar. 11th, 2006 7:28 PM
Revision 1
Helper Scriptsentials
Tags "Random Generation" | PHP | Random
Comments 3 comments
This multiple-use PHP script will randomly generate content based on a randomly generated number.
0
Date Submitted Thu. Aug. 28th, 2008 9:33 AM
Revision 1
Scripter Fordiman
Tags buffering | errors | Output | PHP | template
Comments 0 comments
Best use of ob_, custom error handling, and variable variales evar: simple templating.

_parse($filename[,$locals])
includes $filename and renders its output to the return value. $locals, if used, will add a set of variables to the included context.

Parse($template[,$locals])
Same as above, but allows you to define a base template folder and omit the .php - just for cleaner code.

t($template[,$obj])
...
t()
Same as Parse, but any output between the opening call and the closing call (no arguments) will be buffered intot he $content variable of the template.

Play around with t(..) to find out more; I don't feel like documenting it.
« Previous 1 2 3 4 5 6 7 8 9  ...  12 13 Next »