call php function every 10mins for 1hour
<p>got this code that should check if url is available and also give me ping:</p>

<pre><code>&lt;?php
function test ($url){
$starttime = microtime(true);
$valid = @fsockopen($url, 80, $errno, $errstr, 30);
$stoptime = microtime(true);
echo (round(($stoptime-$starttime)*1000)).' ms.';

if (!$valid) {
   echo "Status - Failure";
} else {
   echo "Status - Success";
}
}

test('google.com');
?&gt;
</code></pre>

<p>How do i make it so this function would be called every lets say 10minues for 1hour (6times in total) ?</p>
