Display user ipconfig /all data on php file??

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

alinpion
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Nov 25, 2010 1:32 am

Display user ipconfig /all data on php file??

Postby alinpion » Mon Jan 28, 2013 12:22 pm

Hello!
Do you have any idea on how to display the cmd ipconfig /all data on a website php file.
Here is what I found but I don't know how to combine it:

User IP:
<?php
$ip = getenv("REMOTE_ADDR") ;
Echo "Your IP is " . $ip;
?>

CMD Path:
<?php
$_ = null;
passthru("C:\\WINDOWS\\system32\\cmd.exe /c custom.bat",$_);
header('Content-Type: text/plain');
echo $_;
?>

CMD command:
ipconfig /all

Return to “PHP coding => General”

Who is online

Users browsing this forum: Google [Bot] and 3 guests