Skip to content

Instantly share code, notes, and snippets.

@oinariman
Created March 14, 2012 07:51
Show Gist options
  • Save oinariman/2034937 to your computer and use it in GitHub Desktop.
Save oinariman/2034937 to your computer and use it in GitHub Desktop.
<?php
$html = file_get_contents($argv[1]);
foreach(preg_split("/(\r?\n)/", $html) as $line) {
preg_match_all("/<a href=\"([^<>]+darami[^<>]+\\.jpg)/", $line, $matches);
foreach ($matches[1] as $link) {
if (strlen($link) > 0) {
print "curl -O $link\n";
}
}
}
?>
@oinariman
Copy link
Author

Usage: php daramichan.php <url> | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment