Khalequzzaman

wapking.cc v4 grabber (download.php file)

Nov 10th, 2015
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <?php
  2. include 'config.php';
  3. $id=$_GET['id'];
  4. if(!$id){
  5. echo '<br/><h2>Error: wrong path entered.</h2><br/>';
  6. die();
  7. }
  8. $host ='http://wapking.cc/files/download/id';
  9. $link =''.$host.'/'.$id.'';
  10. $h = get_headers($link);
  11. $ti = $h[7];
  12. $ti = str_replace('Location: ','',$ti);
  13. $tiku = $ti;
  14. $tiku = str_replace(' ','%20',$tiku);
  15. // file name n replace
  16. $sname = basename($tiku);
  17. $sname = str_replace('%20',' ',$sname);
  18. $sname = str_replace('wapking.fm',''.$site.'',$sname);
  19. // dir make
  20. $dir = "data";
  21. $dir2 = "$dir/$id";
  22. if(!is_dir($dir)){
  23. mkdir($dir);
  24. chmod($dir,0777);
  25. }
  26. if(!is_dir($dir2)){
  27. mkdir($dir2);
  28. chmod($dir2,0777);
  29. }
  30. // save n copy
  31. $save = ''.$dir.'/'.$id.'/'.$sname.'';
  32. $file_extension=pathinfo($save, PATHINFO_EXTENSION);
  33. if(!file_exists($save)) {
  34. if($file_extension=="mp3"){
  35. if(copy($tiku,$save)){
  36. @include 'tag.php'; }
  37. } else {
  38. copy($tiku,$save); }
  39. header("Location: /$save");
  40. } else {
  41. header("Location: /$save");
  42. } ?>
Add Comment
Please, Sign In to add comment