Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "https://api.voluum.com/auth/session");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"email\":\"voluumdemo@voluum.com\",\"password\":\"1qaz!QAZ\"}");
- curl_setopt($ch, CURLOPT_POST, 1);
- $headers = array();
- $headers[] = "Content-Type: application/json; charset=utf-8";
- $headers[] = "Accept: application/json";
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- $result = curl_exec($ch);
- print_r($result);
- if (curl_errno($ch)) {
- echo 'Error:' . curl_error($ch);
- }
- curl_close ($ch);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement