LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   running iptable command as php programming (https://www.linuxquestions.org/questions/programming-9/running-iptable-command-as-php-programming-464219/)

omid1979 07-15-2006 03:01 AM

running iptable command as php programming
 
hi all
I want to run iptable script insert in my file at "/shell/ipt.sh"
i was this command to my visudo file
apache ALL=NOPASSWD: /sbin/iptables

how I can call my shell script to run via php web programming?
how I can get my output via web ?
I use the command below but my output status is Array .

$command = "/tmp/Fw";
exec ($command,$status );

any one can help me ?

graemef 07-15-2006 08:36 AM

What is in you array?

Try a print_r

PHP Code:

echo "<pre>";
print_r ($status);
echo 
"</pre>"



All times are GMT -5. The time now is 11:48 PM.