File: //tmp/test_http.php
<?php
require_once('/var/www/sunsandholidays.com/wp-load.php');
$start = microtime(true);
// Check if external HTTP calls are being made
$urls_to_check = [
'http://api.wordpress.org/',
'http://www.google.com/',
];
// Test WordPress HTTP API
$t = microtime(true);
$response = wp_remote_get('http://api.wordpress.org/', ['timeout' => 2]);
echo 'wp_remote_get wordpress.org: ' . round((microtime(true) - $t) * 1000) . msn;
echo nTotal script time: . round((microtime(true) - $start) * 1000) . msn;