source: branches/dev/html/test/naka/test.php @ 13350

Revision 13350, 611 bytes checked in by naka, 15 years ago (diff)
Line 
1<?php
2
3function gfIsMobileMailAddress($address) {
4    $arrMobileMailDomains = array('docomo.ne.jp', 'ezweb.ne.jp', 'softbank.ne.jp', 'vodafone.ne.jp', 'pdx.ne.jp');
5
6    if (defined('MOBILE_ADDITIONAL_MAIL_DOMAINS')) {
7        $arrMobileMailDomains = array_merge($arrMobileMailDomains, split('[ ,]+', MOBILE_ADDITIONAL_MAIL_DOMAINS));
8    }
9
10    foreach ($arrMobileMailDomains as $domain) {
11        $domain = str_replace('.', '\\.', $domain);
12        if (preg_match("/@([^@]+\\.)?$domain\$/", $address)) {
13            return true;
14        }
15    }
16
17    return false;
18}
19
20
21print(gfIsMobileMailAddress('tatsuyadake-aisitel@dk.pdxa.ne.jp'));
22
23?>
Note: See TracBrowser for help on using the repository browser.