Month: September 2013

Using dropbox api/access dropbox files

1)Create account on dropbox.com and find secret and key.2)Download files from

http://fabi.me/en/php-projects/dropphp-dropbox-api-client/comment-page-1/

3)Set the below in sample.php

$dropbox = new DropboxClient(array(
‘app_key’ => “ztjdoqcp6fokpdg”,
‘app_secret’ => “1zcrmy0eja21lcl”,
‘app_full_access’ => true,
),’en’);

4)Create folder tokens in the downloaded folder if it is not there.

5)The output looks like

loaded access token:

Account:
stdClass Object
(
[referral_link] => http://db.tt/fnZNU4dH
[display_name] => pardeep poria
[uid] => 209317516
[country] => IN
[quota_info] => stdClass Object
(
[shared] => 0
[quota] => 2147483648
[normal] => 498318
)

[email] =>
)

Files:
Array
(
[0] => Getting Started.pdf
[1] => test_download_Getting Started.pdf
)

Meta data of /Getting Started.pdf:
stdClass Object
(
[revision] => 1
[rev] => 113bbff14
[thumb_exists] =>
[bytes] => 249159
[modified] => Mon, 02 Sep 2013 05:20:04 +0000
[client_mtime] => Mon, 02 Sep 2013 05:20:04 +0000
[path] => /Getting Started.pdf
[is_dir] =>
[icon] => page_white_acrobat
[root] => dropbox
[mime_type] => application/pdf
[size] => 243.3 KB
)

Downloading /Getting Started.pdf:
stdClass Object
(
[revision] => 1
[rev] => 113bbff14
[thumb_exists] =>
[bytes] => 249159
[modified] => Mon, 02 Sep 2013 05:20:04 +0000
[client_mtime] => Mon, 02 Sep 2013 05:20:04 +0000
[path] => /Getting Started.pdf
[is_dir] =>
[icon] => page_white_acrobat
[root] => dropbox
[mime_type] => application/pdf
[size] => 243.3 KB
)

Uploading test_download_Getting Started.pdf:
stdClass Object
(
[revision] => 2
[rev] => 213bbff14
[thumb_exists] =>
[bytes] => 249159
[modified] => Mon, 02 Sep 2013 11:42:01 +0000
[client_mtime] => Mon, 02 Sep 2013 11:42:01 +0000
[path] => /test_download_Getting Started.pdf
[is_dir] =>
[icon] => page_white_acrobat
[root] => dropbox
[mime_type] => application/pdf
[size] => 243.3 KB
)

done!

Revisions of test_download_Getting Started.pdf:
Array
(
[0] => stdClass Object
(
[revision] => 2
[rev] => 213bbff14
[thumb_exists] =>
[bytes] => 249159
[modified] => Mon, 02 Sep 2013 11:42:01 +0000
[client_mtime] => Mon, 02 Sep 2013 11:42:01 +0000
[path] => /test_download_Getting Started.pdf
[is_dir] =>
[icon] => page_white_acrobat
[root] => dropbox
[mime_type] => application/pdf
[size] => 243.3 KB
)

)

Searching for JPG files:
Nothing found.