Results 1 to 3 of 3
Hello to all,
I have a problem, I want to show the ping in my web browser, but when I implement the code, it process it first, then shows it, ...
- 06-09-2010 #1Just Joined!
- Join Date
- Oct 2009
- Posts
- 19
ping in web browser
Hello to all,
I have a problem, I want to show the ping in my web browser, but when I implement the code, it process it first, then shows it, I mean...the browser waits until all the pings are done and then it shows all of them like a static web page and not like running a ping from a terminal.
How can i solve that problem??...this are the lines of code that i have implemented:
if ($unix)
{
system ("ping -c$count -w$count $host");
system("killall ping");// kill all ping processes in case there are some stalled ones or use echo 'ping' to execute ping without shell
}
else
{
system("ping -n $count $host");
}
echo '</pre>';
is anything wrong with that??
tks for your answers
- 06-15-2010 #2Just Joined!
- Join Date
- Jun 2010
- Posts
- 2
Hello,
that's totally normal. PHP is a server side language and it treats the informations you send and then send back a result in on time.
If you want to get the data in real time from the server, you have to go through some Ajax. You will probably get more help on a forum about web programming
Hope this helps.
- 06-15-2010 #3Just Joined!
- Join Date
- Oct 2009
- Posts
- 19
Xzan
tks a lot, i'll check it out on ajax
regards,


Reply With Quote