Hi.
I am trying to create a script to find the ping response time for a user. This is to assist in accurate results with my speedtest.
This is the code I have so far:
As far as i know, this scripp should work, which it does on one of my hosts: http://www.skymesh.net.au/~duffell27/ping.phpCode:<?php $ip = $_SERVER['REMOTE_ADDR']; if(!isset($_GET['n'])) { $n=10; } else { $n = $_GET['n']; } $pingme = exec("ping -c$n $ip", $result, $pr); foreach($result as $data) { echo $data . "<br />"; } ?>
Thing is I want it on my other host, which does not work: http://speedtest.nicksastronomy.com/ping.php
Is there a php.ini setting i need to ensure is set before this will work? How do I go about fixing this problem?
Thanks in advance.
Nick.



Reply With Quote


Bookmarks