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');
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');
Resize image function for jpg format. $mood between max and min. if you choose max, this mean max size of image is $ta otherwise min size of image is $ta. function makeTheThumb( $ppath, $ta, $mood ) ...
The best way to determine the character count of a UTF8 string. function strlen_utf8( $str ) { return mb_strlen( $str, 'UTF-8' ); } //or... function strlen_utf8( $str ) { $c = 0;...
This way useful for create mixed arguments function. function foo() { $args = func_get_args(); print_r($args); } foo(1, 1256, 6, 17); //mixed ... -------------------Out-...
Use this function to download a file from web to local machine. function WgetFile( $URL, $dir ) { $nomefile = $dir . "/" . basename( $URL ); if ( copy( $URL, $nomefile ) ) { retu...