IP scan

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Mon Mar 18, 2013 9:41 am

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 and If I enter ip range from to php returns these two active ip adresses ( and
Perhaps someone has some example?

php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

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.

Return to “PHP coding => General”

Who is online

Users browsing this forum: Baidu [Spider], Google Feedfetcher and 4 guests