當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。