當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Auth_OpenID::log方法代碼示例

本文整理匯總了PHP中Auth_OpenID::log方法的典型用法代碼示例。如果您正苦於以下問題:PHP Auth_OpenID::log方法的具體用法?PHP Auth_OpenID::log怎麽用?PHP Auth_OpenID::log使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Auth_OpenID的用法示例。


在下文中一共展示了Auth_OpenID::log方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: canFetchURL

 /**
  * Return whether a URL can be fetched.  Returns false if the URL
  * scheme is not allowed or is not supported by this fetcher
  * implementation; returns true otherwise.
  *
  * @return bool
  */
 function canFetchURL($url)
 {
     if ($this->isHTTPS($url) && !$this->supportsSSL()) {
         Auth_OpenID::log("HTTPS URL unsupported fetching %s", $url);
         return false;
     }
     if (!$this->allowedURL($url)) {
         Auth_OpenID::log("URL fetching not allowed for '%s'", $url);
         return false;
     }
     return true;
 }
開發者ID:openid,項目名稱:php-openid,代碼行數:19,代碼來源:HTTPFetcher.php

示例2: post

 function post($url, $body, $extra_headers = null)
 {
     if (!$this->canFetchURL($url)) {
         return null;
     }
     $this->reset();
     $c = curl_init();
     if (defined('CURLOPT_NOSIGNAL')) {
         curl_setopt($c, CURLOPT_NOSIGNAL, true);
     }
     curl_setopt($c, CURLOPT_POST, true);
     curl_setopt($c, CURLOPT_POSTFIELDS, $body);
     curl_setopt($c, CURLOPT_TIMEOUT, $this->timeout);
     curl_setopt($c, CURLOPT_URL, $url);
     curl_setopt($c, CURLOPT_WRITEFUNCTION, array($this, "_writeData"));
     if (defined('Auth_OpenID_VERIFY_HOST')) {
         curl_setopt($c, CURLOPT_SSL_VERIFYPEER, true);
         curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2);
     }
     curl_exec($c);
     $code = curl_getinfo($c, CURLINFO_HTTP_CODE);
     if (!$code) {
         Auth_OpenID::log("Got no response code when fetching %s", $url);
         Auth_OpenID::log("CURL error (%s): %s", curl_errno($c), curl_error($c));
         return null;
     }
     if (defined('Auth_OpenID_VERIFY_HOST') && $this->isHTTPS($url)) {
         Auth_OpenID::log('OpenID: Verified SSL host %s using ' . 'curl/post', $url);
     }
     $body = $this->data;
     curl_close($c);
     $new_headers = $extra_headers;
     foreach ($this->headers as $header) {
         if (strpos($header, ': ')) {
             list($name, $value) = explode(': ', $header, 2);
             $new_headers[$name] = $value;
         }
     }
     Auth_OpenID::log("Successfully fetched '%s': POST response code %s", $url, $code);
     return new Auth_Yadis_HTTPResponse($url, $code, $new_headers, $body);
 }
開發者ID:kbjr,項目名稱:EasyOpenID,代碼行數:41,代碼來源:ParanoidHTTPFetcher.php

示例3: setOpenIDNamespace

 function setOpenIDNamespace($openid_ns_uri, $implicit)
 {
     if (!in_array($openid_ns_uri, $this->allowed_openid_namespaces)) {
         Auth_OpenID::log('Invalid null namespace: "%s"', $openid_ns_uri);
         return false;
     }
     $succeeded = $this->namespaces->addAlias($openid_ns_uri, Auth_OpenID_NULL_NAMESPACE, $implicit);
     if ($succeeded === false) {
         return false;
     }
     $this->_openid_ns_uri = $openid_ns_uri;
     return true;
 }
開發者ID:BackupTheBerlios,項目名稱:oos-svn,代碼行數:13,代碼來源:Message.php

示例4: post

 function post($url, $body, $extra_headers = null)
 {
     if (!$this->canFetchURL($url)) {
         return null;
     }
     $this->reset();
     $c = curl_init();
     if (defined('CURLOPT_NOSIGNAL')) {
         curl_setopt($c, CURLOPT_NOSIGNAL, true);
     }
     if (defined('Auth_OpenID_HTTP_PROXY')) {
         curl_setopt($c, CURLOPT_PROXY, Auth_OpenID_HTTP_PROXY);
     }
     curl_setopt($c, CURLOPT_POST, true);
     curl_setopt($c, CURLOPT_POSTFIELDS, $body);
     curl_setopt($c, CURLOPT_TIMEOUT, $this->timeout);
     curl_setopt($c, CURLOPT_URL, $url);
     curl_setopt($c, CURLOPT_WRITEFUNCTION, array($this, "_writeData"));
     if (defined('Auth_OpenID_VERIFY_HOST')) {
         // set SSL verification options only if Auth_OpenID_VERIFY_HOST
         // is explicitly set, otherwise use system default.
         if (Auth_OpenID_VERIFY_HOST) {
             curl_setopt($c, CURLOPT_SSL_VERIFYPEER, true);
             curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2);
             if (defined('Auth_OpenID_CAINFO')) {
                 curl_setopt($c, CURLOPT_CAINFO, Auth_OpenID_CAINFO);
             }
         } else {
             curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
         }
     }
     curl_exec($c);
     $code = curl_getinfo($c, CURLINFO_HTTP_CODE);
     if (!$code) {
         Auth_OpenID::log("Got no response code when fetching %s", $url);
         Auth_OpenID::log("CURL error (%s): %s", curl_errno($c), curl_error($c));
         return null;
     }
     if (defined('Auth_OpenID_VERIFY_HOST') && Auth_OpenID_VERIFY_HOST == true && $this->isHTTPS($url)) {
         Auth_OpenID::log('OpenID: Verified SSL host %s using ' . 'curl/post', $url);
     }
     $body = $this->data;
     curl_close($c);
     $new_headers = $extra_headers;
     foreach ($this->headers as $header) {
         if (strpos($header, ': ')) {
             list($name, $value) = explode(': ', $header, 2);
             $new_headers[$name] = $value;
         }
     }
     return new Auth_Yadis_HTTPResponse($url, $code, $new_headers, $body);
 }
開發者ID:marcioyonamine,項目名稱:php-openid,代碼行數:52,代碼來源:ParanoidHTTPFetcher.php

示例5: post

 function post($url, $body, $extra_headers = null)
 {
     if (!$this->canFetchURL($url)) {
         return null;
     }
     $this->reset();
     $c = curl_init();
     if (defined('CURLOPT_NOSIGNAL')) {
         curl_setopt($c, CURLOPT_NOSIGNAL, true);
     }
     curl_setopt($c, CURLOPT_POST, true);
     curl_setopt($c, CURLOPT_POSTFIELDS, $body);
     curl_setopt($c, CURLOPT_TIMEOUT, $this->timeout);
     curl_setopt($c, CURLOPT_URL, $url);
     curl_setopt($c, CURLOPT_WRITEFUNCTION, array(&$this, "_writeData"));
     // <TYPO3-specific>
     if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer']) {
         curl_setopt($c, CURLOPT_PROXY, $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer']);
         if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyTunnel']) {
             curl_setopt($c, CURLOPT_HTTPPROXYTUNNEL, $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyTunnel']);
         }
         if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyUserPass']) {
             curl_setopt($c, CURLOPT_PROXYUSERPWD, $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyUserPass']);
         }
     }
     // </TYPO3-specific>
     curl_exec($c);
     $code = curl_getinfo($c, CURLINFO_HTTP_CODE);
     if (!$code) {
         Auth_OpenID::log("Got no response code when fetching %s", $url);
         return null;
     }
     $body = $this->data;
     curl_close($c);
     $new_headers = $extra_headers;
     foreach ($this->headers as $header) {
         if (strpos($header, ': ')) {
             list($name, $value) = explode(': ', $header, 2);
             $new_headers[$name] = $value;
         }
     }
     Auth_OpenID::log("Successfully fetched '%s': POST response code %s", $url, $code);
     return new Auth_Yadis_HTTPResponse($url, $code, $new_headers, $body);
 }
開發者ID:zsolt-molnar,項目名稱:TYPO3-4.5-trunk,代碼行數:44,代碼來源:ParanoidHTTPFetcher.php

示例6: post

 function post($url, $body, $extra_headers = null)
 {
     if (!$this->canFetchURL($url)) {
         return null;
     }
     $this->reset();
     $c = curl_init();
     if (defined('CURLOPT_NOSIGNAL')) {
         curl_setopt($c, CURLOPT_NOSIGNAL, true);
     }
     curl_setopt($c, CURLOPT_POST, true);
     curl_setopt($c, CURLOPT_POSTFIELDS, $body);
     curl_setopt($c, CURLOPT_TIMEOUT, $this->timeout);
     curl_setopt($c, CURLOPT_URL, $url);
     curl_setopt($c, CURLOPT_WRITEFUNCTION, array(&$this, "_writeData"));
     curl_exec($c);
     $code = curl_getinfo($c, CURLINFO_HTTP_CODE);
     if (!$code) {
         Auth_OpenID::log("Got no response code when fetching %s", $url);
         return null;
     }
     $body = $this->data;
     curl_close($c);
     if ($extra_headers === null) {
         $new_headers = null;
     } else {
         $new_headers = $extra_headers;
     }
     foreach ($this->headers as $header) {
         if (preg_match("/:/", $header)) {
             list($name, $value) = explode(": ", $header, 2);
             $new_headers[$name] = $value;
         }
     }
     Auth_OpenID::log("Successfully fetched '%s': POST response code %s", $url, $code);
     return new Auth_Yadis_HTTPResponse($url, $code, $new_headers, $body);
 }
開發者ID:Kraiany,項目名稱:kraiany_site_docker,代碼行數:37,代碼來源:ParanoidHTTPFetcher.php


注:本文中的Auth_OpenID::log方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。