Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $data_string = json_encode($data);
- $ch=curl_init($url);
- curl_setopt_array($ch, array(
- CURLOPT_POST => true,
- CURLOPT_POSTFIELDS => $data_string,
- CURLOPT_HEADER => true,
- CURLOPT_HTTPHEADER => array('Content-Type:application/json', 'Content-Length: ' . strlen($data_string)))
- ));
- $result = curl_exec($ch);
- curl_close($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement