TeknoCoder adlı üyeden alıntı: mesajı görüntüle
Buyrun hocam umarım çözebilmişimdir
<?php

$handle = fopen("siteler.txt", "r");
if ($handle) {
    while (($line = fgets($handle)) !== false) {

$html_brand = trim($line);
$ch = curl_init();

$options = array(
    CURLOPT_URL            => $html_brand,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HEADER         => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING       => "",
    CURLOPT_AUTOREFERER    => true,
    CURLOPT_CONNECTTIMEOUT => 120,
    CURLOPT_TIMEOUT        => 120,
    CURLOPT_MAXREDIRS      => 10,
);
curl_setopt_array( $ch, $options );
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

if ( $httpCode != 200 ){
    echo "Return code is {$httpCode} \n"
        .curl_error($ch);
        $dosya404 = fopen("404-siteler.txt" , 'a+');
        fwrite ($dosya404 , $line."\n");
        fclose ($dosya404);
} else {
    echo 'Site: ' .$html_brand."   -Status: ". $httpCode."<br>";
    $dosyatemiz = fopen("temiz-siteler.txt" , 'a+');
    fwrite ($dosyatemiz , $line."\n");
    fclose ($dosyatemiz);
  



}




curl_close($ch);

    }
}

?>
Çok teşekkür ederim istediğim oldu.