Sanitizing PHP input to ping program

Go To StackoverFlow.com

2

I would like to interface a php page to the linux command line program ping.

I realize that there are sanitation issues. Is there a builtin library or function that can take care of everything, or will I have to rely on regex parsers?

2009-06-16 08:30
by Unknown


5

Do you mean escapeshellcmd and escapeshellarg?

2009-06-16 08:35
by Paolo Bergantino


0

do you mean to sanitize variable http://php.net/filter_var ?

good tutorial

http://www.phpro.org/tutorials/Filtering-Data-with-PHP.html

2009-06-16 08:33
by Haim Evgi