Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $log = fopen('./log/request.txt', 'w');
- $param = array(
- CURLOPT_URL => 'https://example.com/v2/droplets/948',
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_HTTPHEADER => array(
- "Authorization: Bearer ...",
- "Content-Type: application/json"
- ),
- CURLOPT_FOLLOWLOCATION => 1,
- CURLOPT_VERBOSE => 3,
- CURLOPT_STDERR => $log,
- );
- $ch = curl_init();
- curl_setopt_array($ch, $param);
- curl_exec($ch);
- $response = curl_exec($ch);
- fclose($log);
- curl_close($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement