• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP idna_convert类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中idna_convert的典型用法代码示例。如果您正苦于以下问题:PHP idna_convert类的具体用法?PHP idna_convert怎么用?PHP idna_convert使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了idna_convert类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: domainWorker

 /**
  * @return array
  */
 public function domainWorker()
 {
     $domainsFile = __DIR__ . "/domains.txt";
     $handle = fopen($domainsFile, "r");
     if (!$handle) {
         throw new \RuntimeException('Error opening file ' . $domainsFile);
     }
     $lines = array();
     while (($line = fgets($handle)) !== false) {
         $line = trim(preg_replace('/\\s\\s+/', ' ', $line));
         // convert russian domains
         if (preg_match('/[А-Яа-яЁё]/u', $line)) {
             $IDN = new idna_convert();
             $line = $IDN->encode($line);
             echo $line . "\n\n";
         }
         if (empty($line)) {
             continue;
         }
         $lines[] = $line;
     }
     fclose($handle);
     $uniqueLines = array_unique($lines, SORT_STRING);
     sort($uniqueLines, SORT_STRING);
     if (is_writable($domainsFile)) {
         file_put_contents($domainsFile, implode("\n", $uniqueLines));
     } else {
         trigger_error("Permission denied");
     }
     return $lines;
 }
开发者ID:khristov,项目名称:apache-nginx-referral-spam-blacklist,代码行数:34,代码来源:run.php


示例2: punydecode

 public function punydecode($inputtext)
 {
     require_once 'assets/php/vendors/idna_convert_060/idna_convert.class.php';
     require_once 'assets/php/vendors/idna_convert_060/transcode_wrapper.php';
     $IDN = new idna_convert();
     return $IDN->decode($this->response['inputtext']);
 }
开发者ID:Roewe,项目名称:encoder,代码行数:7,代码来源:Request.php


示例3: process

 public function process(Vtiger_Request $request)
 {
     // SalesPlatform.ru begin
     require_once 'includes/SalesPlatform/NetIDNA/idna_convert.class.php';
     // SalesPlatform.ru end
     $outgoingServerSettingsModel = Settings_Vtiger_Systems_Model::getInstanceFromServerType('email', 'OutgoingServer');
     $loadDefaultSettings = $request->get('default');
     if ($loadDefaultSettings == "true") {
         $outgoingServerSettingsModel->loadDefaultValues();
     } else {
         $outgoingServerSettingsModel->setData($request->getAll());
     }
     $response = new Vtiger_Response();
     // SalesPlatform.ru begin
     $idn = new idna_convert();
     $server_username = $idn->encode(vtlib_purify($request->get('server')));
     $from_email_field = $idn->encode(vtlib_purify($request->get('from_email_field')));
     $request->set('server_username', $server_username);
     $request->set('from_email_field', $from_email_field);
     // SalesPlatform.ru end
     try {
         $id = $outgoingServerSettingsModel->save($request);
         $data = $outgoingServerSettingsModel->getData();
         $response->setResult($data);
     } catch (Exception $e) {
         $response->setError($e->getCode(), $e->getMessage());
     }
     $response->emit();
 }
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:29,代码来源:OutgoingServerSaveAjax.php


示例4: DecodePunycodeIDN

 /** 
  * Decode IDN Punycode to UTF-8 domain name 
  * 
  * @param string $value Punycode 
  * @return string Domain name in UTF-8 charset 
  * 
  * @author Igor V Belousov <[email protected]> 
  * @copyright 2013 Igor V Belousov 
  * @license http://opensource.org/licenses/LGPL-2.1 LGPL v2.1 
  * @link http://belousovv.ru/myscript/phpIDN 
  */
 public static function DecodePunycodeIDN($value)
 {
     Yii::import('application.vendors.punicode.*');
     require_once Yii::getPathOfAlias('application.vendors.punicode') . '/idna_convert.class.php';
     $IDN = new idna_convert();
     // Encode it to its punycode presentation
     $output = $IDN->decode($value);
     return $output;
 }
开发者ID:Aplay,项目名称:Fastreview_site,代码行数:20,代码来源:Helper.php


示例5: convert_host_to_idna

function convert_host_to_idna($host)
{
    $idna = new idna_convert();
    if (viscacha_function_exists('mb_convert_encoding')) {
        $host = mb_convert_encoding($host, 'UTF-8', ENCODING_LIST);
    } else {
        $host = utf8_encode($host);
    }
    $host = $idna->encode($host);
    return $host;
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:11,代码来源:function.phpcore.php


示例6: IDNA

 /**
  *
  */
 private function IDNA()
 {
     if (class_exists('idna_convert')) {
         $IDNA = new \idna_convert();
         $encoded_host = $IDNA->encode($this->host);
         if ($encoded_host != $this->host) {
             $this->properties['url'] = str_replace($this->host, $encoded_host, $this->url);
             $this->properties['host'] = $encoded_host;
         }
         unset($IDNA);
     }
 }
开发者ID:redpic,项目名称:net,代码行数:15,代码来源:Url.php


示例7: files

function files()
{
    $inDB = cmsDatabase::getInstance();
    global $_LANG;
    $do = cmsCore::getInstance()->do;
    $model = new cms_model_files();
    //============================================================================//
    // Скачивание
    if ($do == 'view') {
        $fileurl = cmsCore::request('fileurl', 'html', '');
        if (mb_strpos($fileurl, '-') === 0) {
            $fileurl = htmlspecialchars_decode(base64_decode(ltrim($fileurl, '-')));
        }
        $fileurl = cmsCore::strClear($fileurl);
        if (!$fileurl || mb_strstr($fileurl, '..') || strpos($fileurl, '.') === 0) {
            cmsCore::error404();
        }
        if (strpos($fileurl, 'http') === 0) {
            $model->increaseDownloadCount($fileurl);
            cmsCore::redirect($fileurl);
        } elseif (file_exists(PATH . $fileurl)) {
            $model->increaseDownloadCount($fileurl);
            header('Content-Disposition: attachment; filename=' . basename($fileurl) . "\n");
            header('Content-Type: application/x-force-download; name="' . $fileurl . '"' . "\n");
            header('Location:' . $fileurl);
            cmsCore::halt();
        } else {
            cmsCore::halt($_LANG['FILE_NOT_FOUND']);
        }
    }
    //============================================================================//
    if ($do == 'redirect') {
        $url = str_replace(array('--q--', ' '), array('?', '+'), cmsCore::request('url', 'str', ''));
        if (mb_strpos($url, '-') === 0) {
            $url = htmlspecialchars_decode(base64_decode(ltrim($url, '-')));
        }
        $url = cmsCore::strClear($url);
        if (!$url || mb_strstr($url, '..') || strpos($url, '.') === 0) {
            cmsCore::error404();
        }
        // кириллические домены
        $url_host = parse_url($url, PHP_URL_HOST);
        if (preg_match('/^[а-яё]+/iu', $url_host)) {
            cmsCore::loadClass('idna_convert');
            $IDN = new idna_convert();
            $host = $IDN->encode($url_host);
            $url = str_ireplace($url_host, $host, $url);
        }
        cmsCore::redirect($url);
    }
    //============================================================================//
}
开发者ID:vicktorwork,项目名称:cms1,代码行数:52,代码来源:frontend.php


示例8: getInstanceFromServerType

 public static function getInstanceFromServerType($type,$componentName) {
     // SalesPlatform.ru begin
     require_once 'includes/SalesPlatform/NetIDNA/idna_convert.class.php';
     // SalesPlatform.ru end
     $db = PearDatabase::getInstance();
     $query = 'SELECT * FROM '.self::tableName.' WHERE server_type=?';
     $params = array($type);
     $result = $db->pquery($query,$params);
     try{
     $modelClassName = Vtiger_Loader::getComponentClassName('Model', $componentName, 'Settings:Vtiger');
     }catch(Exception $e) {
         $modelClassName = self;
     }
     $instance = new $modelClassName();
     if($db->num_rows($result) > 0 ){
         $rowData = $db->query_result_rowdata($result,0);
         $instance->setData($rowData);
     }
     // SalesPlatform.ru begin
     $idn = new idna_convert();
     $mail_server_username = $idn->decode($instance->get('server_username'));
     $from_email_field = $idn->decode($instance->get('from_email_field'));
     $instance->set('server_username', $mail_server_username);
     $instance->set('from_email_field', $from_email_field);
     // SalesPlatform.ru end
     return $instance;
 }
开发者ID:Wasage,项目名称:werpa,代码行数:27,代码来源:Systems.php


示例9: clm_function_is_email

function clm_function_is_email($email)
{
    // Include the class
    if (!class_exists('idna_convert')) {
        $path = clm_core::$path . DS . "includes" . DS . "idna_convert.class" . '.php';
        require_once $path;
    }
    $parts = explode('@', $email);
    if (count($parts) != 2) {
        return false;
    }
    // Instantiate it (depending on the version you are using) with
    $IDN = new idna_convert();
    // Encode it to its punycode presentation
    $parts1 = $IDN->encode($parts[1]);
    return filter_var($parts[0] . '@' . $parts1, FILTER_VALIDATE_EMAIL) !== false ? true : false;
}
开发者ID:ChessLeagueManager,项目名称:com_clm,代码行数:17,代码来源:is_email.php


示例10: checkIdna

 public static function checkIdna($ref)
 {
     $content = '';
     if ($ref == "") {
         $content .= "<font color=grey>неизвестно</font>";
     } else {
         $content .= "<a target=_blank href=\"" . $ref . "\">";
         if (stristr(urldecode($ref), "xn--")) {
             $IDN = new idna_convert(array('idn_version' => 2008));
             $content .= $IDN->decode(urldecode($ref));
         } else {
             $content .= urldecode($ref);
         }
         $content .= "</a>";
     }
     return $content;
 }
开发者ID:buildshop,项目名称:bs-common,代码行数:17,代码来源:StatsHelper.php


示例11: __construct

 public function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false)
 {
     if (class_exists('idna_convert')) {
         $idn = new idna_convert();
         $parsed = SimplePie_Misc::parse_url($url);
         $url = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']);
     }
     $this->url = $url;
     $this->useragent = $useragent;
     if (preg_match('/^http(s)?:\\/\\//i', $url)) {
         if (!is_array($headers)) {
             $headers = array();
         }
         $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_CURL;
         $headers2 = array();
         foreach ($headers as $key => $value) {
             $headers2[] = "{$key}: {$value}";
         }
         //TODO: allow for HTTP headers
         // curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2);
         $response = self::$agent->get($url);
         if ($response === false || !isset($response['status_code'])) {
             $this->error = 'failed to fetch URL';
             $this->success = false;
         } else {
             // The extra lines at the end are there to satisfy SimplePie's HTTP parser.
             // The class expects a full HTTP message, whereas we're giving it only
             // headers - the new lines indicate the start of the body.
             $parser = new SimplePie_HTTP_Parser($response['headers'] . "\r\n\r\n");
             if ($parser->parse()) {
                 $this->headers = $parser->headers;
                 //$this->body = $parser->body;
                 $this->body = $response['body'];
                 $this->status_code = $parser->status_code;
             }
         }
     } else {
         $this->error = 'invalid URL';
         $this->success = false;
     }
 }
开发者ID:jaimejorge,项目名称:ftr-site-config-build,代码行数:41,代码来源:SimplePie_HumbleHttpAgent.php


示例12: idnaEncode

 /**
  * Returns an ASCII string (punicode) representation of $value
  *
  * @param string $value
  * @return string An ASCII encoded (punicode) string
  */
 public static function idnaEncode($value)
 {
     if (isset(self::$idnaStringCache[$value])) {
         return self::$idnaStringCache[$value];
     } else {
         if (!self::$idnaConverter) {
             require_once PATH_typo3 . 'contrib/idna/idna_convert.class.php';
             self::$idnaConverter = new \idna_convert(array('idn_version' => 2008));
         }
         self::$idnaStringCache[$value] = self::$idnaConverter->encode($value);
         return self::$idnaStringCache[$value];
     }
 }
开发者ID:KarlDennisMatthaei1923,项目名称:PierraaDesign,代码行数:19,代码来源:GeneralUtility.php


示例13: sendEmail

 /**
  * Функция предотправки писем
  * 
  * $from - адрес, с которого отправлено письмо
  * $from_name - имя отправителя
  * $sender - адрес, для ответа на письмо
  * $message - сообщение
  * $to_address - адрес получателя
  * $to_name - имя получателя
  * $file_pattern - имя файла шаблона
  * 
  * @return bool
  */
 public function sendEmail()
 {
     $arrSendMail = mailer::retSendMail();
     if (!$arrSendMail['From'] || !$arrSendMail['Subject'] || !$arrSendMail['FilePattern']) {
         $this->ErrorInfo = 'Wrong mail parameters. Not FROM or not SUBJECT or not MESSAGE!';
         $this->mailErrorLog();
         return false;
     }
     !empty($arrSendMail['Text']) ? $this->Body = $arrSendMail['FilePattern'] : $this->confMessage($arrSendMail['FilePattern']);
     $idna = new idna_convert();
     $this->From = $idna->encode($arrSendMail['From']);
     $this->Subject = $arrSendMail['Subject'];
     $this->FromName = !$arrSendMail['FromName'] ? $arrSendMail['From'] : $arrSendMail['FromName'];
     $this->Sender = !$arrSendMail['Sender'] ? $this->From : $idna->encode($arrSendMail['Sender']);
     !$arrSendMail['ToName'] ? $this->AddAddress($idna->encode($arrSendMail['ToAddress']), $arrSendMail['ToAddress']) : $this->AddAddress($idna->encode($arrSendMail['ToAddress']), $arrSendMail['ToName']);
     // если включен формат HTML, заменяем перенос строки и вставляем дизайн в письмо
     CONF_MAIL_FORMAT_HTML ? $this->MsgHTML($this->Body) : $this->MsgTXT($this->Body);
     if (!$this->Send()) {
         $this->mailErrorLog();
         return false;
     } else {
         return true;
     }
 }
开发者ID:innova-market,项目名称:JobExpert,代码行数:37,代码来源:bmailer.class.php


示例14: checkmx_idna

function checkmx_idna($host)
{
    if (empty($host)) {
        return false;
    }
    $idna = new idna_convert();
    $host_idna = $idna->encode($host);
    if (viscacha_function_exists('checkdnsrr')) {
        if (checkdnsrr($host_idna, 'MX') === false) {
            return false;
        } else {
            return true;
        }
    } else {
        @exec("nslookup -querytype=MX {$host_idna}", $output);
        while (list($k, $line) = each($output)) {
            # Valid records begin with host name
            if (preg_match("~^(" . preg_quote($host, '~') . "|" . preg_quote($host_idna, '~') . ")~i", $line)) {
                return true;
            }
        }
        return false;
    }
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:24,代码来源:function.global.php


示例15: __construct

 /**
  * Constructor, used to input the data
  *
  * For documentation on all the parameters, see the corresponding
  * properties and their accessors
  *
  * @uses idna_convert If available, this will convert an IDN
  */
 public function __construct($link = null, $type = null, $length = null, $javascript = null, $bitrate = null, $captions = null, $categories = null, $channels = null, $copyright = null, $credits = null, $description = null, $duration = null, $expression = null, $framerate = null, $hashes = null, $height = null, $keywords = null, $lang = null, $medium = null, $player = null, $ratings = null, $restrictions = null, $samplingrate = null, $thumbnails = null, $title = null, $width = null)
 {
     $this->bitrate = $bitrate;
     $this->captions = $captions;
     $this->categories = $categories;
     $this->channels = $channels;
     $this->copyright = $copyright;
     $this->credits = $credits;
     $this->description = $description;
     $this->duration = $duration;
     $this->expression = $expression;
     $this->framerate = $framerate;
     $this->hashes = $hashes;
     $this->height = $height;
     $this->keywords = $keywords;
     $this->lang = $lang;
     $this->length = $length;
     $this->link = $link;
     $this->medium = $medium;
     $this->player = $player;
     $this->ratings = $ratings;
     $this->restrictions = $restrictions;
     $this->samplingrate = $samplingrate;
     $this->thumbnails = $thumbnails;
     $this->title = $title;
     $this->type = $type;
     $this->width = $width;
     if (class_exists('idna_convert')) {
         $idn = new idna_convert();
         $parsed = SimplePie_Misc::parse_url($link);
         $this->link = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']);
     }
     $this->handler = $this->get_handler();
     // Needs to load last
 }
开发者ID:vazahat,项目名称:dudex,代码行数:43,代码来源:Enclosure.php


示例16: decode

 /**
  * Decode an internationalized domain name
  *
  * @param string $strDomain The domain name
  *
  * @return string The decoded domain name
  */
 public static function decode($strDomain)
 {
     $objIdn = new \idna_convert();
     return $objIdn->decode($strDomain);
 }
开发者ID:iCodr8,项目名称:core,代码行数:12,代码来源:Idna.php


示例17: __construct

 public function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false)
 {
     if (class_exists('idna_convert')) {
         $idn = new idna_convert();
         $parsed = SimplePie_Misc::parse_url($url);
         $url = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']);
     }
     $this->url = $url;
     $this->useragent = $useragent;
     if (preg_match('/^http(s)?:\\/\\//i', $url)) {
         if ($useragent === null) {
             $useragent = ini_get('user_agent');
             $this->useragent = $useragent;
         }
         if (!is_array($headers)) {
             $headers = array();
         }
         if (!$force_fsockopen && function_exists('curl_exec')) {
             $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_CURL;
             $fp = curl_init();
             $headers2 = array();
             foreach ($headers as $key => $value) {
                 $headers2[] = "{$key}: {$value}";
             }
             if (version_compare(SimplePie_Misc::get_curl_version(), '7.10.5', '>=')) {
                 curl_setopt($fp, CURLOPT_ENCODING, '');
             }
             curl_setopt($fp, CURLOPT_URL, $url);
             curl_setopt($fp, CURLOPT_HEADER, 1);
             curl_setopt($fp, CURLOPT_RETURNTRANSFER, 1);
             curl_setopt($fp, CURLOPT_TIMEOUT, $timeout);
             curl_setopt($fp, CURLOPT_CONNECTTIMEOUT, $timeout);
             curl_setopt($fp, CURLOPT_REFERER, $url);
             curl_setopt($fp, CURLOPT_USERAGENT, $useragent);
             curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2);
             if (!ini_get('open_basedir') && !ini_get('safe_mode') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>=')) {
                 curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1);
                 curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects);
             }
             $this->headers = curl_exec($fp);
             if (curl_errno($fp) === 23 || curl_errno($fp) === 61) {
                 curl_setopt($fp, CURLOPT_ENCODING, 'none');
                 $this->headers = curl_exec($fp);
             }
             if (curl_errno($fp)) {
                 $this->error = 'cURL error ' . curl_errno($fp) . ': ' . curl_error($fp);
                 $this->success = false;
             } else {
                 $info = curl_getinfo($fp);
                 curl_close($fp);
                 $this->headers = explode("\r\n\r\n", $this->headers, $info['redirect_count'] + 1);
                 $this->headers = array_pop($this->headers);
                 $parser = new SimplePie_HTTP_Parser($this->headers);
                 if ($parser->parse()) {
                     $this->headers = $parser->headers;
                     $this->body = $parser->body;
                     $this->status_code = $parser->status_code;
                     if ((in_array($this->status_code, array(300, 301, 302, 303, 307)) || $this->status_code > 307 && $this->status_code < 400) && isset($this->headers['location']) && $this->redirects < $redirects) {
                         $this->redirects++;
                         $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url);
                         return $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen);
                     }
                 }
             }
         } else {
             $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_FSOCKOPEN;
             $url_parts = parse_url($url);
             $socket_host = $url_parts['host'];
             if (isset($url_parts['scheme']) && strtolower($url_parts['scheme']) === 'https') {
                 $socket_host = "ssl://{$url_parts['host']}";
                 $url_parts['port'] = 443;
             }
             if (!isset($url_parts['port'])) {
                 $url_parts['port'] = 80;
             }
             $fp = @fsockopen($socket_host, $url_parts['port'], $errno, $errstr, $timeout);
             if (!$fp) {
                 $this->error = 'fsockopen error: ' . $errstr;
                 $this->success = false;
             } else {
                 stream_set_timeout($fp, $timeout);
                 if (isset($url_parts['path'])) {
                     if (isset($url_parts['query'])) {
                         $get = "{$url_parts['path']}?{$url_parts['query']}";
                     } else {
                         $get = $url_parts['path'];
                     }
                 } else {
                     $get = '/';
                 }
                 $out = "GET {$get} HTTP/1.1\r\n";
                 $out .= "Host: {$url_parts['host']}\r\n";
                 $out .= "User-Agent: {$useragent}\r\n";
                 if (extension_loaded('zlib')) {
                     $out .= "Accept-Encoding: x-gzip,gzip,deflate\r\n";
                 }
                 if (isset($url_parts['user']) && isset($url_parts['pass'])) {
                     $out .= "Authorization: Basic " . base64_encode("{$url_parts['user']}:{$url_parts['pass']}") . "\r\n";
                 }
                 foreach ($headers as $key => $value) {
//.........这里部分代码省略.........
开发者ID:kosir,项目名称:wp-pipes,代码行数:101,代码来源:File.php


示例18: gen_user_als_list

function gen_user_als_list(&$tpl, &$sql, $user_id)
{
    $domain_id = get_user_domain_id($sql, $user_id);
    $query = <<<SQL_QUERY
        select
            alias_id, alias_name, alias_status, alias_mount, alias_ip_id, url_forward
        from
            domain_aliasses
        where
            domain_id = ?
        order by
            alias_name
SQL_QUERY;
    $rs = exec_query($sql, $query, array($domain_id));
    if ($rs->RecordCount() == 0) {
        $tpl->assign(array('ALS_MSG' => tr('Alias list is empty!'), 'ALS_LIST' => ''));
        $tpl->parse('ALS_MESSAGE', 'als_message');
    } else {
        $counter = 0;
        while (!$rs->EOF) {
            if ($counter % 2 == 0) {
                $tpl->assign('ITEM_CLASS', 'content');
            } else {
                $tpl->assign('ITEM_CLASS', 'content2');
            }
            list($als_action, $als_action_script) = gen_user_als_action($rs->fields['alias_id'], $rs->fields['alias_status']);
            list($als_forward, $als_forward_script) = gen_user_als_forward($rs->fields['alias_id'], $rs->fields['alias_status'], $rs->fields['url_forward']);
            $IDN = new idna_convert();
            $alias_name = $IDN->decode($rs->fields['alias_name']);
            $alias_name = utf8_decode($alias_name);
            $tpl->assign(array('ALS_NAME' => $alias_name, 'ALS_MOUNT' => $rs->fields['alias_mount'], 'ALS_STATUS' => translate_dmn_status($rs->fields['alias_status']), 'ALS_FORWARD' => $als_forward, 'ALS_FWD_SCRIPT' => $als_forward_script, 'ALS_ACTION' => $als_action, 'ALS_ACTION_SCRIPT' => $als_action_script));
            $tpl->parse('ALS_ITEM', '.als_item');
            $rs->MoveNext();
            $counter++;
        }
        $tpl->parse('ALS_LIST', 'als_list');
        $tpl->assign('ALS_MESSAGE', '');
    }
}
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:39,代码来源:manage_domains.php


示例19: singleton

 /**
  * Attempts to return a concrete IDNA instance for either php4 or php5,
  * only creating a new instance if no IDNA instance with the same
  * parameters currently exists.
  *
  * @param array $params Set of paramaters
  *
  * @return object idna_convert
  * @access public
  */
 public function singleton($params = array())
 {
     static $instances;
     if (!isset($instances)) {
         $instances = array();
     }
     $signature = serialize($params);
     if (!isset($instances[$signature])) {
         $instances[$signature] = idna_convert::getInstance($params);
     }
     return $instances[$signature];
 }
开发者ID:kiranos,项目名称:API,代码行数:22,代码来源:php_glesys_zone_import.php


示例20: validateEmailAddress

/**
* Validate an email address - also supports IDN email addresses
* @returns True/false for valid/invalid
*
* @param mixed $sEmailAddress  Email address to check
*/
function validateEmailAddress($sEmailAddress)
{
    require_once APPPATH . 'third_party/idna-convert/idna_convert.class.php';
    $oIdnConverter = new idna_convert();
    $sEmailAddress = $oIdnConverter->encode($sEmailAddress);
    $bResult = filter_var($sEmailAddress, FILTER_VALIDATE_EMAIL);
    if ($bResult !== false) {
        return true;
    }
    return false;
}
开发者ID:GuillaumeSmaha,项目名称:LimeSurvey,代码行数:17,代码来源:common_helper.php



注:本文中的idna_convert类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ilAdvancedSelectionListGUI类代码示例发布时间:2022-05-23
下一篇:
PHP identity类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap