You are here: Re: Simple Ping Tool - Display Each Line « PHP Programming Language « IT news, forums, messages
Re: Simple Ping Tool - Display Each Line

Posted by Matt on 05/27/07 17:54

Schraalhans Keukenmeester wrote:
> At Sun, 27 May 2007 08:03:29 -0700, Matt let h(is|er) monkeys type:
>
> If you tried the example I posted I have no explanation why it won't work.
> It definitely does on my local machine AND my isp's server. You're running
> on a Linux box or...?
>
> Sh.

Yes, unfortunately I just get the end result printed when going through
a browser. Running the script through CLI seems like it prints each
line separately.

I would like each line printed because if I were to perform a 100 count
ping, I may want to see a running result at count 20 as opposed to
waiting the 30 seconds or so time it takes for all 100 pings to complete.

As far as the security warning you elaborated on, I added the following:

$ping_ip_addr = escapeshellcmd($_GET['Host']);

[snip....]

if (preg_match("$regex", $ping_ip_addr) OR preg_match("$regex2",
$ping_ip_addr)) {
exec($ping, $result);


else....fail.

Am I headed the right direction in securing my script? I do prefer it
being a GET since I do want the option of having users modify the url as
opposed to always entering values on the form.

Thanks again!
Matt

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация