Advertisement
Guest User

Untitled

a guest
Mar 15th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. function send_user_pickup_sms($mobile_number = '', $verification_code = '', $smsemailarray=array(),$date="",$time="") {
  2. if ($mobile_number != '' && $verification_code != '') {
  3. //$customer_name = $userDetails['FirstName'].' '.$userDetails['LastName'];
  4. $message = 'projectname Order ID '.$verification_code.' picked up on '.$date.' at '.$time.': ';
  5. foreach($smsemailarray as $item){
  6. $message .= $item["Qty"].$item["name"].' ';
  7. }
  8.  
  9. $message = urlencode($message);
  10.  
  11. //Send Registration code to user via sms
  12. $apiURL = "http://login.smsindiahub.in/vendorsms/pushsms.aspx?user=" . SMSHUB_USERNAME . "&password=" . SMSHUB_PASSWORD . "&msisdn=" . $mobile_number . "&sid=" . SMSHUB_SENDERID . "&msg=" . $message . "&fl=" . SMSHUB_FLAG . "&gwid=" . SMSHUB_GWID;
  13.  
  14. // Initiate curl
  15. $ch = curl_init();
  16. // Set The Response Format to Json
  17. curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
  18. // Disable SSL verification
  19. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  20. // Will return the response, if false it print the response
  21. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  22. // Set the url
  23. curl_setopt($ch, CURLOPT_URL, $apiURL);
  24. // Execute
  25. $result = curl_exec($ch);
  26. echo"<pre>";print_R($result);die;
  27. // Closing
  28. curl_close($ch);
  29.  
  30. return $result;
  31. }
  32. return false;
  33. }
  34.  
  35. {"ErrorCode":"24","ErrorMessage":"Invalid template or template mismatchInvalid template or template mismatch","JobId":null,"MessageData":null}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement