Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. function veridot($string){
  3. while(substr($string,0,1)=="."):
  4. $string=substr($string,1);
  5. endwhile;
  6. return $string;
  7. }
  8.  
  9. function filtrar($string) {
  10. $string = stripslashes($string);
  11. $string = str_replace("/", "", $string);
  12. $string = str_replace("\\", "", $string);
  13. $string = str_replace("%", "", $string);
  14. $string = veridot($string);
  15. return $string;
  16. }
  17.  
  18. $doc=filtrar($_GET["link"]);
  19.  
  20. header('Content-Type:application/octet-stream');
  21. header('Content-Disposition:attachment; filename="'.$doc.'"');
  22. readfile($doc);
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement