当前位置: 首页>>代码示例>>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;未经允许,请勿转载。