Please respond.. I need it urgently..
Thanks...
Moderator: General Moderators
You'll need to loop through all the valid IP addresses in your networks IP range and ping them. There's a bunch of ping libraries available. There's definitely one in PEAR, or there's a tutorial for writing your own here: http://www.planet-source-code.com/vb/sc ... odeId=1786 ... one thing to note: if you're in a big network it'll take ages because PHP doesn't do concurrent sockets very well. You might be able to get somewhere with an array of non-blocking sockets and looping through them, but that's not something I've ever tried.arvinsmendoza wrote:I need help.. Do you know how to automatically detect the IP adddresses in the LAN using PHP? I know that there are many networking functions in this programming language, but I'm really confuse on how to use them..
Do you really think people on here are reading posts and thinking "I'll reply to that tomorrow. Oh, wait, it's really urgent, I'll reply today!". Because they're not. Saying that sort of thing is pointless.Please respond.. I need it urgently..
Code: Select all
exec('ping -b 192.168.1.255');onion2k wrote:You'll need to loop through all the valid IP addresses in your networks IP range and ping them. There's a bunch of ping libraries available. There's definitely one in PEAR, or there's a tutorial for writing your own here: http://www.planet-source-code.com/vb/sc ... odeId=1786 ... one thing to note: if you're in a big network it'll take ages because PHP doesn't do concurrent sockets very well. You might be able to get somewhere with an array of non-blocking sockets and looping through them, but that's not something I've ever tried.arvinsmendoza wrote:I need help.. Do you know how to automatically detect the IP adddresses in the LAN using PHP? I know that there are many networking functions in this programming language, but I'm really confuse on how to use them..
Needlesstosay, that will only detect computers that respond to pings. If they've got firewalls, or the ping service is turned off, then the IP address will appear to be dead even though it's not. There's not really any sensible way around that though.
Do you really think people on here are reading posts and thinking "I'll reply to that tomorrow. Oh, wait, it's really urgent, I'll reply today!". Because they're not. Saying that sort of thing is pointless.Please respond.. I need it urgently..
Is there any other networking functions that would get the system information of the given IP address?.. Thanks..