#!/usr/bin/php $url, CURLOPT_IPRESOLVE => $ipresolve, CURLOPT_TIMEOUT => 3, CURLOPT_FORBID_REUSE => TRUE, CURLOPT_FRESH_CONNECT => TRUE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_USERAGENT => 'ykval-munin-vallatency/1.0', ); if (($ch = curl_init()) === FALSE) return false; if (curl_setopt_array($ch, $opts) === FALSE) return false; // we don't care about the actual response if (curl_exec($ch) === FALSE) return false; $total_time = curl_getinfo($ch, CURLINFO_TOTAL_TIME); curl_close($ch); if (is_float($total_time) === FALSE) return false; return $total_time; }