I have account on sms gateway and I want to send sms message using php language the information which I found in User Guide like this to send sms message I cane use this code and I can send message using it
$xmlString='data=<BILGI>
<KULLANICI_ADI>username</KULLANICI_ADI>
<SIFRE>password</SIFRE>
<BASLIK>subject</BASLIK>
</BILGI>
<ISLEM>
<YOLLA>
<MESAJ>hello from NetCom </MESAJ>
<NO>xxxxxxxxx phone number</NO>
</YOLLA>
</ISLEM>';
//API URL
$postUrl='http://www.toplusmsnet.com/services/api.php?islem=sms';
$Veriler = $xmlString;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $postUrl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $Veriler);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$response = curl_exec($ch);
curl_close($ch);
I can send sms message using above code but I want to pass message's attribute using array like this
$destination = array("messageId" => $messageId,
"to" => $to);
$message = array("from" => $from,
"destinations" => array($destination),
"text" => $text,
"notifyUrl" => $notifyUrl,
"notifyContentType" => $notifyContentType,
"callbackData" => $callbackData);
to make sms configuration more easy. how can I make information to be in array and send it using curl I wish I explained my problem correctly