Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. $url = "http://188.***.***.***/plugins/restapi/v1/chatrooms/".$roomName."/members/".$userJID;
  2. $curl = curl_init($url);
  3. curl_setopt($curl, CURLOPT_HEADER, false);
  4. curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  5. curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/xml", "Authorization : ******")); //I am using plugin.userservice.secret key here
  6. curl_setopt($curl, CURLOPT_POST, true);
  7. curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
  8. $json_response = curl_exec($curl);
  9.  
  10. $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
  11. curl_close($curl);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement