Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. $stringJ = json_encode($data);
  2. //Open connection
  3. $ch = curl_init();
  4.  
  5. //set the url, number of POST vars, POST data
  6. curl_setopt($ch, CURLOPT_URL, $url);
  7. curl_setopt($ch, CURLOPT_POSTFIELDS, $stringJ);
  8.  
  9. //execute post
  10. $result = curl_exec($ch);
  11. echo $result;
  12. //close connection
  13. curl_close($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement