Question: I'm actually wondering if there's some library or code available to do this with. Essentially, all I need to do is **scrape** a page with PHP, including it's CSS files, JavaScript, and images, and replace those URL's in the code with the URL of a local copy.

Any help or links to info on the subject would be really appreciated. Thank you.

Answer: 
[SimpleHTMLDom](http://simplehtmldom.sourceforge.net/) - see the examples on the homepage for an easy method to extract and loop through links
```
$new_page_content = str_replace( $old_url, $new_url, $page_content );

```

[PHP Manual: str\_replace()](http://www.php.net/str_replace)