1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| <soapenv:Body>
<loc:sendSms>
<loc:addresses>tel:'.$destinataire_avec_237.'</loc:addresses>
<loc:senderName>'.$senderName.'</loc:senderName>
<loc:message>'.$message_a_envoyer.'</loc:message>
<loc:receiptRequest>
<endpoint>http://vps123456784000.vps.ca/testsms.php</endpoint>
<interfaceName>SmsNotification</interfaceName>
<correlator>123424012525</correlator>
</loc:receiptRequest>
</loc:sendSms>
</soapenv:Body>
</soapenv:Envelope>';
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1000);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_POSTFIELDS,$post_string);
curl_setopt($ch,CURLOPT_HTTPHEADER,array (
"Content-Type: application/x-www-form-urlencoded; charset=utf-8"
));
$data = curl_exec($ch);
$httpCode=curl_getinfo($ch,CURLINFO_HTTP_CODE); |
Partager