$time_cache || !file_exists($cachefile)) { ob_start(); //$timeout = array('http' => array('timeout' => 20)); $ag = $_SERVER['HTTP_USER_AGENT']; $url = 'xtubeth.com/file/'.$q.'.php'; //http://heesex.com/video/?views='.$q; $ch = curl_init(); //curl_setopt ($ch, CURLOPT_USERAGENT, $ag); curl_setopt ($ch, CURLOPT_USERAGENT, $ag); curl_setopt ($ch, CURLOPT_URL, $url ); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($ch, CURLOPT_TIMEOUT, 60); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 8); $result = curl_exec ($ch) or die ("Couldn't connect"); curl_close ($ch); $result = ($result); //preg_match('/file: "(.*?)",/isu',$result,$name); //$videos=str_replace('_files','',$name); //$video=$videos[1]; preg_match_all('/file: "(.*?)",/isu',$result,$media); //echo '
lss :: '.$media[1][0]; // echo '
video :: '.$media[1][1]; //echo '
video :: '.$media[1][2]; //echo '
video :: '.$media[1][3]; ?>