Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. class Sms
  2. {
  3. function send($destination, $content){
  4. $ci =& get_instance();
  5. $userKey = $ci->config->item('sms_user_key');
  6. $passKey = $ci->config->item('sms_pass_key');
  7.  
  8. $xmlResponse = simplexml_load_file("http://example.com?user=$userKey&pass=$passKey&senderid=&nomor=$destination&pesan=".urlencode($content));
  9. $jsonResponse = json_encode($xmlResponse);
  10. $response = json_decode($jsonResponse);
  11.  
  12. return $response->message;
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement