I want to remotely execute tracert in a Windows machine with PHP exec(). I have:
<?php
echo exec("C:\\Windows\\System32\\TRACERT.exe");
echo "<br/>Success!";
?>
This does not give me errors and it prints "Success!." But how do I pass an argument (such as an IP address to tracert.exe and print the result in a variable or array? I do not know the syntax to pass an argument that looks like: tracert , etc.