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'开发者_Python百科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.
SimpleHTMLDom - 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()
精彩评论