Skip to content

Instantly share code, notes, and snippets.

@molotovbliss
Created February 17, 2015 07:43
Show Gist options
  • Save molotovbliss/6c22ff02b50ccce3a643 to your computer and use it in GitHub Desktop.
Save molotovbliss/6c22ff02b50ccce3a643 to your computer and use it in GitHub Desktop.
sitemap.xml to .txt list of urls one liner, used with siege
php -r '$x=new SimpleXMLElement(file_get_contents("sitemap.xml"));foreach($x->url as $n) echo $n->loc.PHP_EOL;' > urls.txt
@molotovbliss
Copy link
Author

With just wget
php -r '$x=new SimpleXMLElement(file_get_contents("sitemap.xml"));foreach($x->url as $n) echo $n->loc.PHP_EOL;' | xargs -n 1 -P 8 wget -q

https://stackoverflow.com/questions/7577615/parallel-wget-in-bash

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