📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
firmarehberiv1.demodesign.com.tr
/
system
📝
class.iletimerkezi.php
← Geri Dön
<?php class Sms { public function send($api_username,$api_password,$message,$number,$orginator) { $number = preg_replace('/\D/','',$number); $number = substr($number, -10); $xml = <<<EOS <request> <authentication> <username>{$api_username}</username> <password>{$api_password}</password> </authentication> <order> <sender>{$orginator}</sender> <sendDateTime></sendDateTime> <message> <text><![CDATA[{$message}]]></text> <receipents> <number>{$number}</number> </receipents> </message> </order> </request> EOS; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,'http://api.iletimerkezi.com/v1/send-sms'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$xml); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,2); 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_HEADER, 0); // curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 120); curl_setopt($ch,CURLOPT_VERBOSE, FALSE); $result = curl_exec($ch); } public function getBalance($api_username,$api_password) { $xml = <<<EOS <request> <authentication> <username>{$api_username}</username> <password>{$api_password}</password> </authentication> </request> EOS; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,'http://api.iletimerkezi.com/v1/get-balance'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$xml); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,2); 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_HEADER, 0); // curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 120); $result = curl_exec($ch); preg_match_all('|\<sms\>.*\<\/sms\>|U', $result, $matches,PREG_PATTERN_ORDER); if(isset($matches[0])&&isset($matches[0][0])) { return $matches[0][0]; } return ''; } } ?>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula