Ejemplo 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;
 }
Ejemplo 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;
 }
Ejemplo 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;
 }