Bez tytułu

z Crimson Pig, 5 lata temu, napisane w Plain Text, wyświetlone 346 razy.
URL https://pastebin.k4be.pl/view/72801cc5 Udostępnij
Pobierz wklejkę lub Pokaż surowy tekst
  1. <?php
  2. stream_context_set_default(array('http'=>array('method'=>'HEAD')));
  3.  
  4. $file = $_GET['file'];
  5.  
  6. $url = 'https://archive.archlinux.org/repos/last/' . urlencode($file);
  7. $h = get_headers($url);
  8. if (strpos($h[0], "200"))
  9. {
  10.     header('Location: ' . $url);
  11. }
  12. else
  13. {
  14.     preg_match("@([^/]+)-.+-.+-.+$@", $file, $match);
  15.     $url = 'https://archive.archlinux.org/packages/' . urlencode($match[1][0]) . '/' . urlencode($match[1]) . '/' . urlencode($match[0]);
  16.     header('Location: ' . $url);
  17. }
  18. ?>
  19.  

odpowiedź "Bez tytułu"

Tutaj możesz odpowiedzieć na wklejkę z góry

captcha