This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// taken from: https://github.com/izniburak/google-bot-curl/blob/master/google-bot.php | |
function googleBot($url) | |
{ | |
$header = array(); | |
$header[] = 'Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'; | |
$header[] = 'Cache-Control: max-age=0'; | |
$header[] = 'Content-Type: text/html; charset=utf-8'; | |
$header[] = 'Transfer-Encoding: chunked'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --user-agent "Googlebot/2.1 (+http://www.google.com/bot.html)" -v $@ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This shortcode will allow you to create a snapshot of a remote website and post it | |
* on your WordPress site. | |
* | |
* [snapshot url="http://www.wordpress.org" alt="WordPress.org" width="400" height="300"] | |
*/ | |
add_shortcode( 'snapshot', function ( $atts ) { | |
$atts = shortcode_atts( array( |