I am working on little project. Task is get ip or address from input field and then run ping command for that ip and finally print result in the webpage.
I have written code:
<FORM ACTION="pingIp.php">
Enter Host: <INPUT name="host">
<INPUT TYPE=SUBMIT VALUE="Submit">
</FORM>
<div class="results"></div>
I don't know how to run ping command and retrieve results on webpage. Can you please give little php code as an example?