Please help me ...! direct link

Started on the old forum in November 2011 · view the original in the archive · old links redirect here

1 reply · 416 views · started 15 years ago · 1 min read

2 participants
ariwahyudi30 Newbie · 1 posts #1
  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> <form method=post> Masukkan link Indowebster yang mau di generate

Contoh : http://www.indowebster.com/Toeic_Oxford.html

<input name=link size=50> <input type=submit value=generate> </form> <?php set_time_limit(0); $link=$_POST['link']; if(isset($link) && $link !== ""){ $data=curlget($link); $ukuran=antara($data,'**Size:** ',''); $dl="http://www.indowebster.com/download=".antara($data,'['); 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 "; } else{ echo "<a href="$zzz">$zzz](#) ($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

ogah Junior · 17 posts #2
<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=','"');
$dl = antara($data, '<a id="download" href="', '"');
$data2=curlget($dl);
$dl = antara($data2, '<p id="link-download" align="center"><a href="', '"');
header('location: '.$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>

if you get error "header already sent blablabla..." replace header('location: '.$dl); with meta refresh

note: you can't use curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); on free host usually free host disable this option

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close