1. please help me, give me a sample code how to get a direct download link directly to 4shared ..???
2.and I have an example of a direct link to indowebster but still erorr
please help me fix it
<html>
<head> <title>IDWS direct link generator
view plain
print?</title>
</head>
<body>
<center>
<form method=post>
Masukkan link Indowebster yang mau di generate<br>
Contoh : http://www.indowebster.com/Toeic_Oxford.html<p>
<input name=link size=50>
<input type=submit value=generate>
</form>
<p>
<?php
set_time_limit(0);
$link=$_POST['link'];
if(isset($link) && $link !== ""){
$data=curlget($link);
$ukuran=antara($data,'<div id="size"><b>Size: </b> ','</div>');
$dl="http://www.indowebster.com/download=".antara($data,'<a href="download=','"');
$data2=curlget($dl);
$dl=antara($data2,'<form action="download.php"','</form>');
preg_match_all("/input type="hidden" value="(.*?)"/", $dl, $match);
$kuncis=$match[1][0];
$id=$match[1][1];
$name=$match[1][2];
$post="kuncis=$kuncis&id=$id&name=$name";
for($i=0;$i<5;$i++){
$data3=curlpost("http://www.indowebster.com/download.php",$post);
$zzz=antara($data3,"refresh: 0; url=","n");
if (preg_match('/location: files_not_found.htm/',$data3)){
//echo "$zzz<br>";
}
else{
echo "<a href="$zzz">$zzz</a><br>($ukuran)";
break;
}
}
}
function curlpost($url,$post){
$agent=$_SERVER['HTTP_USER_AGENT'];
$curl=curl_init();
curl_setopt($curl, CURLOPT_URL,$url);
curl_setopt($curl, CURLOPT_USERAGENT, $agent);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
curl_setopt($curl, CURLOPT_ENCODING, "");
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION ,1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER ,1);
$data = curl_exec($curl);
curl_close ($curl);
return $data;
}
function curlget($url){
$agent=$_SERVER['HTTP_USER_AGENT'];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, $agent);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_ENCODING, "");
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
function antara($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
?>
</body>
</html>
Parse error: parse error in C:\xampp\htdocs\jajal\download\link.php
2.and I have an example of a direct link to indowebster but still erorr
please help me fix it
<html>
<head> <title>IDWS direct link generator
view plain
print?</title>
</head>
<body>
<center>
<form method=post>
Masukkan link Indowebster yang mau di generate<br>
Contoh : http://www.indowebster.com/Toeic_Oxford.html<p>
<input name=link size=50>
<input type=submit value=generate>
</form>
<p>
<?php
set_time_limit(0);
$link=$_POST['link'];
if(isset($link) && $link !== ""){
$data=curlget($link);
$ukuran=antara($data,'<div id="size"><b>Size: </b> ','</div>');
$dl="http://www.indowebster.com/download=".antara($data,'<a href="download=','"');
$data2=curlget($dl);
$dl=antara($data2,'<form action="download.php"','</form>');
preg_match_all("/input type="hidden" value="(.*?)"/", $dl, $match);
$kuncis=$match[1][0];
$id=$match[1][1];
$name=$match[1][2];
$post="kuncis=$kuncis&id=$id&name=$name";
for($i=0;$i<5;$i++){
$data3=curlpost("http://www.indowebster.com/download.php",$post);
$zzz=antara($data3,"refresh: 0; url=","n");
if (preg_match('/location: files_not_found.htm/',$data3)){
//echo "$zzz<br>";
}
else{
echo "<a href="$zzz">$zzz</a><br>($ukuran)";
break;
}
}
}
function curlpost($url,$post){
$agent=$_SERVER['HTTP_USER_AGENT'];
$curl=curl_init();
curl_setopt($curl, CURLOPT_URL,$url);
curl_setopt($curl, CURLOPT_USERAGENT, $agent);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
curl_setopt($curl, CURLOPT_ENCODING, "");
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION ,1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER ,1);
$data = curl_exec($curl);
curl_close ($curl);
return $data;
}
function curlget($url){
$agent=$_SERVER['HTTP_USER_AGENT'];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, $agent);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_ENCODING, "");
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
function antara($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
?>
</body>
</html>
Parse error: parse error in C:\xampp\htdocs\jajal\download\link.php
Comment