Hi all, pretty rusty on my php as I haven't used any in nearly a year. I've tried searching around but have been unable to find any answer. The following is my code: <form id="blacklisted" name="blform" method="POST" action="test.php"> <input type="text" name="ip" size="20" > <input type="submit" name="submit" value="Check"> Checking <?php echo $_POST["ip"]; ?> <?php echo '<pre>'; system('./rbl.pl "$ip"'); echo '</pre>'; ?> My problem is that I am trying to get ip passed into the system command there. My echo command works just fine and brings up what I've entered but the second $ip inside of system() acts as if it is not there and runs the command as if there is no option entered. I've tried at least 10 different methods and had no luck. Can anyone assist me? Thanks very much in advance.
<form id="blacklisted" name="blform" method="POST" action="test.php"> <input type="text" name="ip" size="20" > <input type="submit" name="submit" value="Check"> </form> <?php $ip = $_POST['ip']; echo 'Checking '.$ip.'<br>'; echo '<pre>'; system('./rbl.pl',$ip); echo '</pre>'; ?> PHP:
Hey guys, Thanks for the assist, however, its still functioning in the same way. This is particularly confounding since the "Checking" echo is now echoing the $ip instead of the original one. It almost acts like its running the rbl.pl and then afterwards seeing the , $ip. I tried a few slight alterations to the syntax of the system() line but none of those worked either and either had no effect or gave me a parsing error. Any other ideas? Thanks again, Scott
For those that come searching for answers after me and find this page... I found the answer at the following link and was able to slightly modify it to use my command instead of ping. www . chipmunk-scripts . com / tutorials / exec.php It was EXACTLY what I was looking for. Thanks all, Scott