PHP email validation





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

« Previous 1 2 3 4 5 6 7 8 9  ...  15 16 Next »
2
Date Submitted Thu. Feb. 28th, 2008 4:10 PM
Revision 1
Helper inxilpro
Tags "Regular | Expression" | regex | RegExp
Comments 1 comments
This is as close to a perfect URL regular expression as I've come. It's based on RFC 3986.

A few caveats:

It only accepts http/https/ftp URLs by design, but you could change that to accept any valid URI pretty easily.

It doesn't support IP-based URLs or authenticated URLs. This is also by design, but you could change that with a little work.
13
Date Submitted Mon. Oct. 23rd, 2006 10:19 PM
Revision 1
Helper jdenton
Tags Calendar | Date | days | PHP
Comments 0 comments
daysBeteenDates will calculate the number of days between 2 dates in the form of 'YYYY-MM-DD'.
5
Date Submitted Mon. Oct. 23rd, 2006 10:48 PM
Revision 1
Helper jdenton
Tags GD | gif | images | jpeg | PHP | png | Resize
Comments 1 comments
The resize_image function allows you to resize a GIF, JPEG or PNG file to any dimension you wish and put an optional black border around the image. Here's an explanation of the arguements:

$image_path: The complete path to the image to be resized

$max_width: Maximum width of the resized image. Leave 0 if you want to specify only the height and have the width auto-scale.

$max_height: Maximum height of the resized image. Leave 0 if you want to specify only the width and have the height auto-scale.

$file_prefix: This will prepend a string onto the resized image filename. If you want to create a thumbnail image and keep the original, set $file_prefix = 'thumb'.

$dir: Allows you to save the resized image to a sub directory under the $image_path directory. If you want to save thumbnail images to images/thumbs, set $dir = 'thumbs'.

$border: boolean, 1 = border, 0 = no border

$mime: Image mime type. (image/jpeg, image/gif, image/png)
10
Date Submitted Mon. Dec. 4th, 2006 11:03 PM
Revision 1
Helper jdenton
Tags "date convert" | PHP
Comments 0 comments
Give this little function a start date and number of days and it will calculate the end date.
28
Date Submitted Tue. Nov. 8th, 2005 4:53 AM
Revision 1
Beginner jelena
Tags Image | PHP | Thumbnail
Comments 8 comments
Create a Thumbnail
12
Date Submitted Tue. May. 9th, 2006 9:36 AM
Revision 1
Helper jpinkham
Tags Email | Java | Validate
Comments 1 comments
Another solution recommends using a text match pattern.
This works, but as long as you've got mail.jar in your classpath anyway, you might as well use this technique instead. (Plus, I think it works with older JDK 1.2+, whereas pattern.compile is 1.4+)

Note that it also accepts a comma-separated list of emails, just like a To: or CC: address line would.
15
Date Submitted Sun. Sep. 24th, 2006 5:35 PM
Revision 1
Helper kahotep
Tags Form | HTML | PHP
Comments 1 comments
Generates a tree view within a dropdown select box.
12
Date Submitted Sun. Sep. 24th, 2006 5:43 PM
Revision 1
Helper kahotep
Tags HTML | PHP
Comments 6 comments
Generates select boxes, text boxes, check boxes and radio buttons. Via a handful of functions.
-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.
23
Date Submitted Wed. May. 3rd, 2006 4:31 PM
Revision 3
Beginner kaparo
Tags geotarget | geotargetting | PHP
Comments 3 comments
This snippet originally is used for targetting ads banners depended on the geographic location of the visitor, but can be used for other purposes. Also originally is used for US and the rest of the world, but you can add check for other countries too.
« Previous 1 2 3 4 5 6 7 8 9  ...  15 16 Next »