You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
671 B

  1. <?php
  2. // JL8
  3. // This one totally cheats by using someone else's easy-to-mirror archive
  4. // Thanks, Axel! Way easier for me :)
  5. // If the limbero.org archive one day falls out of sync or goes offline, I'll
  6. // update this to pull from the actual Tumblr blog instead.
  7. if (!is_dir('jl8')) {
  8. mkdir('jl8');
  9. }
  10. $url = 'http://limbero.org/jl8/comics/';
  11. $html = file_get_contents($url);
  12. preg_match_all('@href="([^"]+\\.jpe?g)"@', $html, $matches);
  13. foreach ($matches[1] as $img) {
  14. if (!is_file('jl8/' . $img)) {
  15. echo "Downloading $img\n";
  16. $data = file_get_contents($url . $img);
  17. file_put_contents('jl8/' . $img, $data);
  18. usleep(5e5);
  19. }
  20. }