View Full Version : automatically cache outbound (external) links?

05-31-2007, 10:35 AM
How would I go about making my website automatically cache external links and provide an option to "view cached page"?
Also, are there any effective ways to cache without using up a lot of diskspace/bandwidth? Could i do "text only" caches?

05-31-2007, 06:21 PM
You would read one of your pages, find all links that are external (using a regex). Then for each links, lead the HTML through cURL, PEAR or external fopen (if host allows it). By only loading the HTML you are getting basically text only. But you'd lose any markup applied through CSS.