<?php
$text[1] = "http://google.com";
$text[2] = "http://yahoo.com";
$text[3] = "http://budaacilmayanbirsite.com";
$say = count($text)-1;
$don = 0;
$yeni_dizi = array();
while(true):
$id_text = array_rand($text);
$rastgele = $text[$id_text];
if(!in_array($rastgele,$yeni_dizi)):
if(@dns_get_record(str_replace('http://','',$rastgele))):
echo $id_text.' - '.$rastgele.'sitesi açık';
break;
endif;
$don++;
$yeni_dizi[] = $rastgele;
endif;
endwhile;
?>işine yarar sanırım.