Question For SMS |
How integration SMS APIs with codeigniter, The API am used as below :
http://demowebsite/demo.cfm?numbers=9627...ut=5000000
I use sendmode.com and its as simple as this:
$url = 'http://api.sendmode.com/httppost.aspx?Type=sendparam&username='.urlencode($this->sms_cfg['user']) .'&password='.urlencode($this->sms_cfg['pword']).'&numto='.urlencode($sms_sendto).'&data1='.urlencode($sms_text).'&senderid='.urlencode($sms_sendfrom); $reply = strtolower(file_get_contents($url)); /* * $reply is a string: "<httppost_result><call_result><result>True</result><error></error></call_result></httppost_result>" * this breaks down into * <httppost_result> * <call_result> * <result> * True * </result> * <error> * </error> * </call_result> * </httppost_result> */ return array($this->xml_extract($reply,'result')=='true', $this->xml_extract($reply,'error')); |
Welcome Guest, Not a member yet? Register Sign In |