Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

IP scan

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

IP scan

Postby citro » Mon Mar 18, 2013 9:56 am

hi, if it is possible with php web interface scan active local network ip addresses? For example in LAN are 20 pc's. Two of them are turned on and their addresses are 192.168.10.10 and 192.168.10.16. If I enter ip range from 192.168.10.1 to 192.168.10.20 php returns these two active ip adresses (192.168.10.10 and 192.168.10.16).
Perhaps someone has some example?
citro
New php-forum User
New php-forum User
 
Posts: 1
Joined: Mon Mar 18, 2013 9:41 am

Re: IP scan

Postby johnj » Mon Mar 18, 2013 10:04 pm

One way I think is - use exec() in php to run a "ping" for a particular ip and parse the output to decide if that ip is present. So, for a range you have to loop through all the addresses in the entire range.
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm


Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.