• 16-07-2010, 14:16:36
    #10
    Üyeliği durduruldu
    AKoyun arkadaşımızın verdiği örneği deneyebilirisiniz.

    bu da aleternatif

    <?php
        function host( $url )
        {
            $parsed = parse_url($url);
    
            return  isset($parsed['host']) ? $parsed['host'] :  '';
        }
    
    
        function is_online( $host )
        {
            return @fsockopen($host,80,$errno,$errstr,1);
        }
    
        $text = array();
        $text[1] = "http://zzzzz";
        $text[2] = "http://www.google.com";
        $text[3] = "http://127.0.0.1";
    
    
        while (!($url_online = is_online(host($rastgele_url = $text[$index = array_rand($text)]))) && $url_var = count($text))
            unset($text[$index]);
    
    
    
        if ($url_online)
        {
            echo $rastgele_url.' rasgtgele seçildi ve şuan online.';
        }
        else
        {
            echo 'tüm adresler denendi ama online bulunamadı.';
        }
    
    ?>
  • 16-07-2010, 15:49:19
    #11
    if(@file_get_contents($url)){echo 'acik';}else{echo 'kapali';}
  • 16-07-2010, 15:51:31
    #12
    Arkadaşlar gerek kalmadı, ama çok sağolun gene. 24 saat dolsun hepinizin terazisinin tozunu alıcam