Exemplo n.º 1
0
 function execute($data = null)
 {
     if (isset($this->curl[CURLOPT_POST]) && $this->curl[CURLOPT_POST]) {
         return parent::Execute();
     }
     $cache = $this->cache;
     $url = $this->curl[CURLOPT_URL];
     $ret = $cache::Get($url);
     if ($ret) {
         return $ret;
     }
     $ret = parent::Execute($data);
     $cache::Set($ret, $url);
     return $ret;
 }
Exemplo n.º 2
0
 static function fetch($url)
 {
     $http = new Fetch($url);
     $obj = $http->Execute();
     return $obj->getContent();
 }