Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $dataString = json_encode($data);
- $ch = curl_init($this->apiUrl . $url);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $type);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $dataString);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array(
- 'Content-Type: application/json',
- 'Expect:',
- 'Content-Length: ' . strlen($dataString))
- );
- $result = curl_exec($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement