コード例 #1
0
 public function httpAction()
 {
     $data = Cola_Com_Http::get('http://www.google.com');
     var_dump(Cola_Com_Http::responseHeader());
 }
コード例 #2
0
 /**
  * Http request
  *
  * @param string $uri
  * @param array $opts @see http://cn2.php.net/manual/en/context.http.php
  * @return mixed string if ok or false when error
  */
 public static function request($uri, $context)
 {
     $data = @file_get_contents($uri, null, $context);
     self::$_responseHeader = $http_response_header;
     return $data;
 }