You are here

private function dropbox::_content_request in Dropbox Client 7.2

Same name and namespace in other branches
  1. 7.4 dropbox.php \dropbox::_content_request()
  2. 7 dropbox.php \dropbox::_content_request()
  3. 7.3 dropbox.php \dropbox::_content_request()
2 calls to dropbox::_content_request()
dropbox::get in ./dropbox.php
Retrieve a file from the currently authenticated user's dropbox account. Note: The path should be relative to the root dropbox folder and the destination should be relative to your sites root folder.
dropbox::thumbnails in ./dropbox.php
Retrieve thumbnail data from image files at specified path.

File

./dropbox.php, line 396

Class

dropbox

Code

private function _content_request($uri, $destination) {
  $uri = preg_replace("#(^|[^:])//+#", "\\1/", '/' . self::API_VERSION . $uri);
  $request = "GET {$uri} HTTP/" . self::HTTP_1 . self::LINE_END;
  $specialhost = 'api-content.dropbox.com';
  $url = self::SCHEME . '://' . $specialhost . $uri;
  $header = $this
    ->_build_header($url, 'GET', $request, self::LINE_END, array(
    'Host' => $specialhost,
  ));
  if (self::DEBUG) {
    error_log($header);
  }
  $this
    ->_connect($url, $header, 'GET', false, $destination);
}