<?php
$postUrl = 'http://websms.telsam.com.tr/xmlapi/sendsms';
$username = 'demo';   //Panel girişi yaptığınız Kullanıcı Adınız
$password = 'demo';    //Panel girişi yaptığınız Şifreniz
$originator = 'BASLIK'; //Buraya Başlık gireceksiniz
$text = 'Test Mesaj';

$receivers = array('5320000000', '5420000000');

foreach ( $receivers AS $receiver ){  
    $receiversStr .= '<receiver>' . $receiver . '</receiver>';
}

$xmlStr = '
<?xml version="1.0"?>
<SMS>
  <authentication> 
    <username>' . $username . '</username> 
    <password>' . $password . '</password> 
  </authentication> 
  <message>
    <originator>' . $originator . '</originator> 
    <text>' . $text . '</text> 
    <unicode></unicode> 
  </message>
  <receivers>' . $receiversStr . '</receivers> 
</SMS>';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $postUrl); 
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlStr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$response = curl_exec($ch);

echo $response;