I'm using snoopy and phpQuery. If I have a URL, i'd like to open up the cached version of that url on google. Any date, doesn't matter, as long as a version exists i'll take it.
Any ideas on how to do this?
To manually replicate this:
- Select your url, lets say http://www.abc.net.au/news/infographics/qld-floods/beforeafter.htm
- Load up http://www.google开发者_如何学JAVA.com.au
- Type in this url in the search box
- The first result is the url, click "Cache" underneath it.
So I want to grab that URL, which looks like this:
http://webcache.googleusercontent.com/search?q=cache:BOtHTvfch7UJ:www.abc.net.au/news/infographics/qld-floods/beforeafter.htm+http://www.abc.net.au/news/infographics/qld-floods/beforeafter.htm&cd=1&hl=en&ct=clnk&gl=au&source=www.google.com.au
Okay just worked it out
http://webcache.googleusercontent.com/search?q=cache:http://www.abc.net.au/news/infographics/qld-floods/beforeafter.htm &hl=en &strip=1
strip=1 will load the page without css or javascript (I'm guessing it's what the robot sees?).
That's awesome. google rocks.
精彩评论