Exemplo n.º 1
0
 function getRedirectedUrl()
 {
     $this->res = HTTP::head($this->result_url);
     if (preg_match('/^3/', $this->res['response_code'])) {
         return $this->res['Location'];
     }
     return false;
 }
Exemplo n.º 2
0
 public static function head($url, $headers = array(), $auth = false)
 {
     $url = self::$config['apiURLPrefix'] . $url;
     if (self::$apiVersion) {
         $headers[] = "Zotero-API-Version: " . self::$apiVersion;
     }
     if (!$auth && self::$apiKey) {
         $headers[] = "Authorization: Bearer " . self::$apiKey;
     }
     $response = HTTP::head($url, $headers, $auth);
     return $response;
 }
Exemplo n.º 3
0
 public static function head($url, $headers = array(), $auth = false)
 {
     self::loadConfig();
     $url = self::$config['apiURLPrefix'] . $url;
     $response = HTTP::head($url, $headers, $auth);
     return $response;
 }