scriptte bulunan sms bilgilendirme sistemini şuan kullanamıyorum sistemi yazan arkadaş talep olmadığı için kendi sms sistemini kapatmış bizde netgsm kullanıyoruz arkadaş netgsm apilerini sisteme entegre edebilirsin dedi fakat bu konu da pek bilgim olmadığı için uğraştım fakat çözemedim. bu konuda yardımcı olabilecek bir arkadaş varmı.
arkadaşlar ücreti neyse karşılamaya hazırım makul bir ücret teklifinde bulunan var ise fiyat bildirsin anlaşırsak yaptırıcam bu işi anlayan arkadaşlar lütfen cevap yazsın
bu alttakiler mevcut sistemin kodları
/* SMS fonksiyonlar TilPark! sistemine 27 Kasım 2013 Çarşamba günü eklenmiştir.
SMS fonksiyonları ile tilpark sisteminden sms gönderimi yapabilirsiniz.
*/
function sms_curl($post='')
{
if(is_array($post))
{
$_POST = $post;
}
$ch = curl_init(); // oturum baslat
// POST adresi
curl_setopt($ch, CURLOPT_URL,"http://www.tilpark.com/sms/index.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_REFERER, 'http://www.google.com.tr');
curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)');
$html = curl_exec($ch);
curl_close ($ch);
return $html;
}
/* SMS gönderme fonksiyon */
function send_sms($username, $password, $sms)
{
$xml = '';
$quantity = 0;
$i = 0;
while($i < 100000)
{
if(isset($sms[$i]))
{
if($sms[$i]['gsm'] == ''){}
else
{
$sms_quantity = ceil(strlen($sms[$i]['sms']) / 160);
$quantity = $quantity + $sms_quantity;
$xml = $xml.'
<YOLLA>
<MESAJ>'.$sms[$i]['sms'].'</MESAJ>
<NO>'.$sms[$i]['gsm'].'</NO>
</YOLLA>';
}
}
else
{
$i = 9000000;
}
$i++;
}
// sms kullanıcı adı ve şifre bilgilerini çekiyoruz
$sms_balance = get_option(array('group'=>'sms', 'key'=>'sms_balance'));
if($sms_balance > $quantity)
{
$html = sms_curl(array('send_sms'=>'', 'sms_username'=>$username, 'sms_password'=>$password, 'quantity'=>$quantity, 'xml'=>$xml));
if($html == 'ERR_USERNAME_PASSWORD'){ alertbox('alert-danger', 'SMS sunucusuna bağlantı kurulamadı, Hatalı kullanıcı adı ve şifre'); return false;}
else if($html == 'sms_bakiyesi_yok'){ alertbox('alert-danger', 'Yeterli SMS paketi yok.', 'SMS gönderebilmeniz için SMS paketi satın almalısınız.'); return false;}
else
{
return true;
}
}
else
{
alertbox('alert-danger', 'Yeterli SMS bakiyeniz yok.'); return false;
}
}bu alttaki kodlarda netgsm örnek xml api kodlarıfunction XMLPOST($PostAddress,$xmlData)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$PostAddress);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlData);
$result = curl_exec($ch);
return $result;
}
$xml='<?xml version="1.0" encoding="iso-8859-9"?>
<mainbody>
<header>
<company>NETGSM</company>
<usercode>KullaniciAdi</usercode>
<password>Sifre</password>
<startdate></startdate>
<stopdate></stopdate>
<type>1:n</type>
<msgheader>MesajBasligi</msgheader>
</header>
<body>
<msg><![CDATA[Test Mesaji]]></msg>
<no>905121231212</no>
</body>
</mainbody>';
$gelen=XMLPOST('http://api.netgsm.com.tr/xmlbulkhttppost.asp',$xml);
echo $gelen;