当前位置: 首页>>代码示例>>PHP>>正文


PHP CHTTP::sGet方法代码示例

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


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

示例1: GetOpenIDServerTags

	function GetOpenIDServerTags($url)
	{
		if ($str = @CHTTP::sGet($url, true))
		{
			$server = '';
			$delegate = '';

			if (preg_match('/<link[^>]+rel=(["\'])([^>"]*\s)?openid\.server(\s[^>"]*)?\1[^>]*>/i', $str, $arLinks))
				if (preg_match('/href=["\']([^"|\']+)["\']/i', $arLinks[0], $arHref))
					$server = $arHref[1];

			if (preg_match('/<link[^>]+rel=(["\'])([^>"]*\s)?openid.delegate(\s[^>"]*)?\1[^>]*>/i', $str, $arLinks))
				if (preg_match('/href=["\']([^"|\']+)["\']/i', $arLinks[0], $arHref))
					$delegate = $arHref[1];

			if (strlen($server) <= 0)
			{
				$GLOBALS['APPLICATION']->ThrowException(GetMessage('OPENID_CLIENT_NO_OPENID_SERVER_TAG'));
				return false;
			}
			return array('server' => $server, 'delegate' => $delegate);
		}
		$GLOBALS['APPLICATION']->ThrowException(GetMessage('OPENID_CLIENT_NO_OPENID_SERVER_TAG'));
		return false;
	}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:25,代码来源:openidclient.php

示例2: GetCurrentUser

	public function GetCurrentUser()
	{
		if($this->access_token === false)
			return false;

		$result = CHTTP::sGet(self::CONTACTS_URL."?access_token=".urlencode($this->access_token));
		if(!defined("BX_UTF"))
			$result = CharsetConverter::ConvertCharset($result, "utf-8", LANG_CHARSET);

		return CUtil::JsObjectToPhp($result);
	}
开发者ID:nProfessor,项目名称:Mytb,代码行数:11,代码来源:liveidoauth.php

示例3: doRequestToLocalhost

 /**
  * Make request to current site and return result
  * @param string $pPath - url path, e.g. /upload/tmp/test.php
  * @return bool|string
  */
 protected static function doRequestToLocalhost($pPath)
 {
     $url = self::getCurrentSiteUrl();
     $url .= $pPath;
     $url .= "?" . mt_rand();
     //Prevent web-server cache
     return @CHTTP::sGet($url);
 }
开发者ID:spas-viktor,项目名称:books,代码行数:13,代码来源:environment.php

示例4: GetCurrentUser

	public function GetCurrentUser()
	{
		if($this->access_token === false)
			return false;

		$result = CHTTP::sGet(self::GRAPH_URL.'/me?access_token='.$this->access_token."&fields=picture,id,name,first_name,last_name,gender,birthday,email");
		
		if(!defined("BX_UTF"))
			$result = CharsetConverter::ConvertCharset($result, "utf-8", LANG_CHARSET);

		return CUtil::JsObjectToPhp($result);
	}
开发者ID:nProfessor,项目名称:Mytb,代码行数:12,代码来源:facebook.php

示例5: GetAllPagesNotAuth

 private function GetAllPagesNotAuth($arResult)
 {
     static $arTwits = array();
     if (!isset($arResult["next_page"]) || $arResult["page"] == 15 || intval($arResult["page"]) < 1) {
         return $arTwits;
     }
     $result = CHTTP::sGet(self::SEARCH_URL . $arResult["next_page"]);
     if (!defined("BX_UTF")) {
         $result = CharsetConverter::ConvertCharset($result, "utf-8", LANG_CHARSET);
     }
     $arResult = CUtil::JsObjectToPhp($result);
     $arTwits = array_merge($arTwits, $arResult["results"]);
     return self::GetAllPages($arResult);
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:14,代码来源:twitter.php

示例6: GetCurrentUser

	public function GetCurrentUser()
	{
		if($this->access_token === false)
			return false;

		$result = CHTTP::sGet(self::CONTACTS_URL.'contacts/default/full?v=3.0&alt=json&oauth_token='.urlencode($this->access_token));

		return CUtil::JsObjectToPhp($result);
	}
开发者ID:nProfessor,项目名称:Mytb,代码行数:9,代码来源:google.php

示例7: GetCurrentUser

	public function GetCurrentUser()
	{
		if($this->access_token === false)
			return false;

		$result = CHTTP::sGet(self::CONTACTS_URL.'?uids='.$this->userID.'&fields=uid,first_name,last_name,nickname,screen_name,sex,bdate,city,country,timezone,photo,photo_medium,photo_big,photo_rec&access_token='.urlencode($this->access_token));

		if(!defined("BX_UTF"))
			$result = CharsetConverter::ConvertCharset($result, "utf-8", LANG_CHARSET);

		return CUtil::JsObjectToPhp($result);
	}
开发者ID:nProfessor,项目名称:Mytb,代码行数:12,代码来源:vkontakte.php

示例8: GetCurrentUser

	public function GetCurrentUser()
	{
		if($this->access_token === false)
			return false;
		$sign=md5("app_id=".$this->appID."method=users.getInfosecure=1session_key=".$this->access_token.$this->appSecret);
		$result = CHTTP::sGet(self::CONTACTS_URL.'?method=users.getInfo&secure=1&app_id='.$this->appID.'&session_key='.urlencode($this->access_token).'&sig='.$sign);
		if(!defined("BX_UTF"))
			$result = CharsetConverter::ConvertCharset($result, "utf-8", LANG_CHARSET);

		return CUtil::JsObjectToPhp($result);
	}
开发者ID:nProfessor,项目名称:Mytb,代码行数:11,代码来源:mailru.php

示例9: GetUserInfo

 	public function GetUserInfo($user_id)
 	{
		$result = CHTTP::sGet(self::API_URL.'users/show.json?user_id='.$user_id);
		return CUtil::JsObjectToPhp($result);
 	}
开发者ID:nProfessor,项目名称:Mytb,代码行数:5,代码来源:twitter.php

示例10: GetUserInfo

	public function GetUserInfo($user_id)
	{
		$result = CHTTP::sGet(self::API_URL.'users/show.json?user_id='.$user_id);
		if(!defined("BX_UTF"))
			$result = CharsetConverter::ConvertCharset($result, "utf-8", LANG_CHARSET);
		return CUtil::JsObjectToPhp($result);
	}
开发者ID:nProfessor,项目名称:Mytb,代码行数:7,代码来源:twitter.php

示例11: fetch

 function fetch($url)
 {
     /*
     if (!($handle = fopen($url, "rb"))) {
     	WindowsLiveLogin::debug("error: fetch: Could not open url: $url");
     	return;
     }
     
     if (!($contents = stream_get_contents($handle))) {
     	WindowsLiveLogin::debug("Error: fetch: Could not read from url: $url");
     }
     
     fclose($handle);
     */
     //$str = $url."\n\n".$contents."\n\n\n";
     //file_put_contents(__FILE__ . '.ftech.log', $str, FILE_APPEND);
     $contents = CHTTP::sGet($url, false);
     return $contents;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:19,代码来源:liveid.php

示例12: SendFeed

	public function SendFeed($socServUserId, $message, $getNewToken=true)
	{
		if(!$this->access_token || intval($this->userId) < 1)
			self::SetOauthKeys($socServUserId);
		if(!defined("BX_UTF"))
			$message = CharsetConverter::ConvertCharset($message, LANG_CHARSET, "utf-8");
		$this->sign = strtolower(md5('application_key='.$this->appKey.'method=users.setStatusstatus='.$message.md5($this->access_token.$this->appSecret)));
		$result = CHTTP::sGet(self::CONTACTS_URL."?method=users.setStatus&application_key=".$this->appKey."&access_token=".$this->access_token."&sig=".$this->sign."&status=".urlencode($message));

		if(!defined("BX_UTF"))
			$result = CharsetConverter::ConvertCharset($result, "utf-8", LANG_CHARSET);
		$arResult = CUtil::JsObjectToPhp($result);
		if($getNewToken === true && isset($arResult["error_code"]) && $arResult["error_code"] == "102")
			{
				$newToken = self::RefreshToken($socServUserId);
				if($newToken === true)
					self::SendFeed($socServUserId, $message, false);
				else
					return false;
			}
		return $arResult;
	}
开发者ID:nProfessor,项目名称:Mytb,代码行数:22,代码来源:odnoklassniki.php

示例13: GetCurrentUser

	public function GetCurrentUser()
	{
		if($this->access_token === false)
			return false;

		$result = CHTTP::sGet(self::CONTACTS_URL."?method=users.getCurrentUser&application_key=".$this->appKey."&access_token=".$this->access_token."&sig=".$this->sign);
		if(!defined("BX_UTF"))
			$result = CharsetConverter::ConvertCharset($result, "utf-8", LANG_CHARSET);

		return CUtil::JsObjectToPhp($result);
	}
开发者ID:nProfessor,项目名称:Mytb,代码行数:11,代码来源:odnoklassniki.php


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