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.

19 lines
492 B

  1. <?php
  2. // When I Grow Up
  3. // https://www.wigucomics.com/whenigrowup/
  4. if (!is_dir('wigu-when-i-grow-up')) {
  5. mkdir('wigu-when-i-grow-up');
  6. }
  7. for ($i = 1; $i <= 679; $i++) {
  8. $name = sprintf('WIGU%04d.jpg', $i);
  9. if (!is_file("wigu-when-i-grow-up/{$name}")) {
  10. $data = file_get_contents("https://www.wigucomics.com/whenigrowup/comics/{$name}");
  11. echo "Downloading {$name}\n";
  12. file_put_contents("wigu-when-i-grow-up/{$name}", $data);
  13. usleep(5e5);
  14. }
  15. }