• 08-08-2015, 03:52:37
    #1
    Üyeliği durduruldu
    Merhabalar,

    Bir php dosyasına aşağıdaki komut yazdığımda çalışmıyor;

    <?php
    file_get_contents("http://api.iletimerkezi.com/v1/send-sms/get/?username=xx&password=xx&text=deneme&receipents=xx&sender=xx");
    ?>
    ama şöyle yazdığımda çalışıyor;

    <?php
    echo file_get_contents("http://api.iletimerkezi.com/v1/send-sms/get/?username=xx&password=xx&text=deneme&receipents=xx&sender=xx");
    ?>
    Böyle çalışıyor fakat ekrana sonuç döndürüyor. Ben arkada ekrana hiçbirşey vermeden çalışmasını istiyorum. Bunu nasıl yapabilirim?
  • 08-08-2015, 08:20:03
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    NetBlogi adlı üyeden alıntı: mesajı görüntüle
    Merhabalar,

    Bir php dosyasına aşağıdaki komut yazdığımda çalışmıyor;

    <?php
    file_get_contents("http://api.iletimerkezi.com/v1/send-sms/get/?username=xx&password=xx&text=deneme&receipents=xx&sender=xx");
    ?>
    ama şöyle yazdığımda çalışıyor;

    <?php
    echo file_get_contents("http://api.iletimerkezi.com/v1/send-sms/get/?username=xx&password=xx&text=deneme&receipents=xx&sender=xx");
    ?>
    Böyle çalışıyor fakat ekrana sonuç döndürüyor. Ben arkada ekrana hiçbirşey vermeden çalışmasını istiyorum. Bunu nasıl yapabilirim?
    Değişkene atamayı unutuyorsunuz hocam.

    <?php 
    $a=file_get_contents("http://api.iletimerkezi.com/v1/send-sms/get/?username=xx&password=xx&text=deneme&receipents=xx&sender=xx");
    
    // echo $a
    ?>
  • 08-08-2015, 11:43:25
    #3
    Üyeliği durduruldu
    sawashan adlı üyeden alıntı: mesajı görüntüle
    Değişkene atamayı unutuyorsunuz hocam.

    <?php 
    $a=file_get_contents("http://api.iletimerkezi.com/v1/send-sms/get/?username=xx&password=xx&text=deneme&receipents=xx&sender=xx");
    
    // echo $a
    ?>
    Boylede olmuyorki echo yazinca oluyor anca
  • 08-08-2015, 16:48:27
    #4
    NetBlogi adlı üyeden alıntı: mesajı görüntüle
    Boylede olmuyorki echo yazinca oluyor anca
    Ne yapmaya çalışıyorsunuz tam olarak.
  • 09-08-2015, 17:20:35
    #5
    Üyeliği durduruldu
    sawashan adlı üyeden alıntı: mesajı görüntüle
    Ne yapmaya çalışıyorsunuz tam olarak.
    Sayfa çağrıldığında adres sayesinde sms gönderilecek. Basit birşey ama ekrana sonuç döndürmeden beceremedim maalesef.
  • 10-08-2015, 01:14:12
    #6
    curl kullanın

    function curl_sayfayicalistir($Url){
     
        // Curl kurulumu yapılmış mı?
        if (!function_exists('curl_init')){
            die('Curl php'ye kurulmamış!');
        }
     
    
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $Url);
        curl_setopt($ch, CURLOPT_REFERER, "https://www.r10.net/");
        curl_setopt($ch, CURLOPT_USERAGENT, "MozillaXYZ/1.0");
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        $output = curl_exec($ch);
        curl_close($ch);
        return $output;
    }
    
    curl_sayfayicalistir("http://api.iletimerkezi.com/v1/send-sms/get/?username=xx&password=xx&text=deneme&receipents=xx&sender=xx");
  • 10-08-2015, 01:20:03
    #7
    Üyeliği durduruldu
    gwebreklam adlı üyeden alıntı: mesajı görüntüle
    curl kullanın

    function curl_sayfayicalistir($Url){
     
        // Curl kurulumu yapılmış mı?
        if (!function_exists('curl_init')){
            die('Curl php'ye kurulmamış!');
        }
     
    
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $Url);
        curl_setopt($ch, CURLOPT_REFERER, "https://www.r10.net/");
        curl_setopt($ch, CURLOPT_USERAGENT, "MozillaXYZ/1.0");
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        $output = curl_exec($ch);
        curl_close($ch);
        return $output;
    }
    
    curl_sayfayicalistir("http://api.iletimerkezi.com/v1/send-sms/get/?username=xx&password=xx&text=deneme&receipents=xx&sender=xx");
    Evet bu şekilde oldu. Teşekkür ederim.