Burti adlı üyeden alıntı: mesajı görüntüle
tekerlekli sandalyeyle

bu kötü esprinin üzerine benim kodlarımı veriyim sana

function getirxx($url){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $x = curl_exec($ch);
    curl_close($ch); 
    return $x;
}


function redtube($x){
	if(preg_match('#redtube-#i',$x)){
		$id			= str_replace(array('redtube-','mp4'),'',$x);
		$filename 	= "redtube-{$id}.cache";
		$cachefile 	= "redtube-flv/cache/".$filename;
		$cachetime 	= 10 * 60;
		if (file_exists($cachefile)) {
			if(time() - $cachetime < filemtime($cachefile)){
				$flv = file_get_contents($cachefile);
			}else {
				unlink($cachefile);
			} 
		}else{
			$bak 	= getirxx("http://www.redtube.com.nyud.net/".$id);
			preg_match("|<source src='(.*)' type='video/mp4'>|",$bak,$ver);
			$flv	= trim($ver[1]);
			$flv	= urldecode($flv);
			$fp 	= fopen($cachefile, "w+");
			fwrite($fp, $flv);
			fclose($fp);
		}

		return $flv;
	}else{
		return $x;
	}
}
Çok işime yaradı dostum çok sağol.