Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - ariwahyudi30

Pages: [1]
1
PHP Tutorials / Please help me ...! direct link
« on: November 04, 2011, 09:50:27 AM »
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

Code: [Select]
<html>
<head> <title>direct link generator
view plain
print?</title>
</head>
<body>
<center>
<form method=post>
Masukkan link Indowebster yang mau di generate<br>
<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>');

$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("",$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($curlCURLOPT_URL,$url);
 curl_setopt($curlCURLOPT_USERAGENT$agent);
 curl_setopt($curlCURLOPT_POST1);
 curl_setopt($curlCURLOPT_POSTFIELDS$post);
 curl_setopt($curlCURLOPT_ENCODING"");
 curl_setopt($curlCURLOPT_HEADER1);
 curl_setopt($curlCURLOPT_FOLLOWLOCATION  ,1);
 curl_setopt($curlCURLOPT_RETURNTRANSFER  ,1);
 $data curl_exec($curl);
 curl_close ($curl);
 return $data;
}
function curlget($url){
  $agent=$_SERVER['HTTP_USER_AGENT'];
  $curl curl_init();
  
curl_setopt($curlCURLOPT_URL$url);
  curl_setopt($curlCURLOPT_USERAGENT$agent);
  curl_setopt($curlCURLOPT_RETURNTRANSFER1);
  
curl_setopt($curlCURLOPT_FOLLOWLOCATION1);
  curl_setopt($curlCURLOPT_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

Pages: [1]