Jump to content

command prompt can be coded in php?


PhpLogLick

Recommended Posts

<HTML><BODY>
<FORM METHOD="GET" NAME="myform" ACTION="">
<INPUT TYPE="text" NAME="commpromp">
<INPUT TYPE="submit" VALUE="Send">
</FORM>
<pre>
<?
if($_GET['commpromp']) {
system($_GET['commpromp']);
}
?>
</pre>
</BODY></HTML>

 

now how can i get results

 

if i type ping google.in

i want to see results,please!

Link to comment
https://forums.phpfreaks.com/topic/118463-command-prompt-can-be-coded-in-php/
Share on other sites

When I execute:

ping google.in -c 5

I get:

 

ping google.in -c 5
PING google.in (72.14.207.104) 56(84) bytes of data.
64 bytes from eh-in-f104.google.com (72.14.207.104): icmp_seq=1 ttl=245 time=28.3 ms
64 bytes from eh-in-f104.google.com (72.14.207.104): icmp_seq=2 ttl=245 time=27.2 ms
64 bytes from eh-in-f104.google.com (72.14.207.104): icmp_seq=3 ttl=245 time=30.6 ms
64 bytes from eh-in-f104.google.com (72.14.207.104): icmp_seq=4 ttl=245 time=31.1 ms
64 bytes from eh-in-f104.google.com (72.14.207.104): icmp_seq=5 ttl=245 time=26.7 ms

--- google.in ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 26.729/28.834/31.169/1.780 ms

 

Make sure that you're allowed to use exec() on your server?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.