soulmy adlı üyeden alıntı: mesajı görüntüle
$dosya1=file_get_contents("link.txt");
$dosya1 = str_replace(array("rn", "r"), "n", $dosya1);
$dosya2=explode("n",$dosya1);

function GetMetodu($url) {
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
// curl_setopt($ch,CURLOPT_HEADER, false);

$output=curl_exec($ch);
curl_close($ch);
return $output;
}

$git = GetMetodu($dosya2[0]);
Şunu dener misin?


yok üstad o hiç çalışmadı. Localde ve VPS de çalışan kod aşağıda. Çoğu hostta çalışmıyor. host kaynaklı olabilir belki ama kodlarda hata yok, çalışmaması ilginç.

$dosya1=file_get_contents("link.txt");
$dosya2=explode("\r\n",$dosya1);

function GetMetodu($url) { 
    $ch = curl_init(); 
    curl_setopt($ch,CURLOPT_URL,$url); 
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); 
 // curl_setopt($ch,CURLOPT_HEADER, false); 
    
    $output=curl_exec($ch); 
    curl_close($ch); 
    return $output; 
} 

$git = GetMetodu($dosya2[0]);