Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $handle = curl_init('https://content.dropboxapi.com/2/files/download');
- $out_handle = fopen('output.tmp', 'w');
- $options = array(
- 41 => 1,
- 42 => 1,
- 2 => false,
- 19913 => 1,
- 52 => false,
- 64 => 1,
- CURLOPT_HTTPHEADER => array(
- 'Authorization: Bearer (snipped valid bearer)',
- 'Content-Type:',
- 'Dropbox-API-Arg: {"path":"/(snipped valid path)"}',
- ),
- 47 => 1,
- 10001 => $out_handle,
- 19914 => 1,
- 45 => false,
- 10104 => array(400),
- );
- curl_setopt_array($handle, $options);
- $response = curl_exec($handle);
- $error = curl_error($handle);
- $getinfo = curl_getinfo($handle);
- curl_close($handle);
- var_dump($error);
- var_dump($response);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement