Email Address Checker

This function check if an e-mail address is valid or not.

function valid_email($email)
{
    return preg_match('/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/',
        $email);
}
 
echo valid_email('test@test.com');

Tags

No tag here.

Recommended pages

Gregorian to Persian Date Convertor...

Gregorian to Persian Date Convertor....

Extract numbers from a unicode string...

Quick extract numbers from a unicode string......

Delete or Remove all files and folders in a directory‎...

If you want to delete everything from folder (including subfolders) use this function. function removeDir( $dir ) { if ( is_dir( $dir ) ) { $objects = scandir( $dir ); foreach ( $o...

Detect file extension function...

This function is used to find the file extension also you can use pathinfo() function for get information about a file path. function ext($file_name) { return substr($file_name, strrpos($fi...