Thankyou for downloading this file, please wait '.$ref.' seconds (OR) click here to download file';
}
break;
default :
$url = "http://www.4shared.com/$type/$id/";
$result = file_get_contents($url);
$preview = strstr($result, 'getAudioHtml5Player');
$preview1 = potong($preview,"'","'");
$preview2 = explode('/',$preview1);
$preview3 = explode('tsid_3D',$preview2[6]);
$uag = $_SERVER['HTTP_USER_AGENT'];
ini_set('user_agent',$uag."\r\naccept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\naccept_charset: $_SERVER[HTTP_ACCEPT_CHARSET]\r\naccept_language: $_SERVER[HTTP_ACCEPT_LANGUAGE]");
$result1 = file_get_contents($url);
$get = strstr($result1, "id='divDLStart'>");
$get1 = potong($get, "");
$proxy = str_replace(':/','',$get1);
$get2 = explode('?tsid=',$get1);
$get3 = explode('/',$get2[0]);
$server = explode('.',$get3[2]);
if (!empty($preview1)){
$size = getSizeFile($preview1);
header("Content-Type: audio/mp3");
header("Content-length: $size");
header("Content-Disposition: attachment; filename=\"$name\"");
readfile($preview1);
exit();
}elseif (!empty($get1)){
$konter = potong($result1,"var c = ",";");
setcookie("other","$konter",time()+$konter,"/");
include 'head.php';
echo 'Please Wait
'.$konter.' seconds (OR)
click here To Download File
';
echo '';
}else{
include 'head.php';
echo 'Error !!! file not found
';
}
break;
}
echo '';
function getSizeFile($url) {
if (substr($url,0,4)=='http') {
$x = array_change_key_case(get_headers($url, 1),CASE_LOWER);
if ( strcasecmp($x[0], 'HTTP/1.1 200 OK') != 0 ) { $x = $x['content-length'][1]; }
else { $x = $x['content-length']; }
}
else { $x = @filesize($url); }
return $x;
}
function potong($content,$start,$end){
if($content && $start && $end) {
$r = explode($start, $content);
if (isset($r[1])){
$r = explode($end, $r[1]);
return $r[0];
}
return '';
}
}
include 'foot.php';
?>