How to mirror sites in PHP with wget
wget --mirror -w 2 -p --html-extension --convert-links -P -H -Dexample.com ~/path/to/save/locally http://example.com
mirror, wait 2 seconds, get all required elements, convert extensions to html, convert links to work locally, prefix folder, enable spanning across hosts when doing recursive retrieving, set domains to be followed, path to put stuff, domain.