Log in
يك شنبه,۱۶ بهمن ماه ۱۳۹۰مطابق با
١٣ ربيع الاول ۱۴۳۳هجرى قمرى

Validate an E-mail or website
check for email pattern
if( !preg_match( "/^(
([^<>()[\]\\\\.,;:\s@\"]+(\.[^<>()[\]\\\\.,;:\s@\"]+)*)|
(\"([^\"\\\\\r]|(\\\\[\w\W]))*\"))@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|
(([a-z\-0-9áàäçéèêñóòôöüæøå]+\.)+[a-z]{2,}))$/i", $email ) ) {
$msg = 'Email address was not recognized as a valid email pattern';
}
get the mx host name
$domain = preg_replace( “/^[\w\W]*@([^@]*)$/i”, “$1″, $email );
Validate an e-mail address
function is_valid_email ($address) {
return (preg_match(
'/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+'. // the user name
'@'. // the ubiquitous at-sign
'([-0-9A-Z]+\.)+' . // host, sub-, and domain names
'([0-9A-Z]){2,4}$/i', // top-level domain (TLD)
trim($address)));
}
Validate a Website
function is_valid_web_url($url) {
//return (preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $url));
return (preg_match(
'/^(http|https):\/\/'.
'.*/i', $url, $m
));
}
Post your comment
Subpages
- Partition and Format
- Application in chroot
- Realplayer and IE
- SSL & Serverzertifikat
- Debian Package
- Solaris Package
- Linux commands
- Web service
- PHP
- PERL
Archives:
- Mercurial & hg view
- jPortal wordpress theme
- WordPress Careers plugin
- Check For Email pattern
- WordPress ODLinks Plugin
- WordPress Classifieds Plugin
- Clean up the Ubuntu
- Persian philosophs and sciences
- » Hosting & Service Provider
- » Highlights of Iran's history
- » Persian philosophs and sciences
- » Spiele für Schulkinder
- » ایستگاه قطار دورتموند
- » Schule Übungsblätter
- » LIVE-STREAM
- » Learning French
- » حاج آقا سيد عباس دوستانى
- » Korea Live TVs
- » Aktuelle Angebote
- » Take a free course online.
Categories:
Links
- (IE)HTML - اديتور به فارسي و لاتين
- Online Graphic Plotter
- Online scientific calculator
- تقويم ساليانه
- تبديل کُدهای رايج
- تبدیل تاریخ شمسی به میلادی
- فارسی نويس
- تبديل خط فينگليش به فارسى





