0 ) ) { // Bots normally has no cookies... $isBot = true; } // Return result return $isBot; } function fetch_url($url) { // Apply some filters here $url = apply_filter('fetch_url', $url); // Let's download it from the server include_once( ABSPATH . "wp-includes/class-snoopy.php"); $client = new Snoopy(); $client->agent = "WordPress on " . get_option('siteurl'); $client->fetch( $url ); if ( $client->status == "200" || $client->status == "302" ) { // Transfer the content $content = $client->results; } else { // If not 200 or 302 $content = $client->status; } // Return the fetched content return $content; } ?>