First, are you talking about discovering information about users visiting your site? Keep in mind that this implies an invasion of their privacy (you can try it with yourself, though;))
Is it possible for PHP to know if a user is logging out of the Internet from behind a router?
No, you can’t. Only when you know that, for example, you have many visitors from the same company, and they all have the same IP address, they can be behind the router, but it can also be a proxy server.
And if so, how can I get some information about this router, for example:
- Router name, brand, serial number, ...
If you have an IP address, you can discover various things about the host with tools like nmap . You could find out the brand of the router and the host system, but definitely not the serial number and such things. nmap is not PHP. Note: Using such tools without permission is prohibited in some countries. In any case, the use of such tools without permission is morally questionable.
- Users connected on the same network.
As I mentioned in the first question, if you have different users with the same IP address, they can be on the same network. They can also be on different subnets. In any case, you cannot get your local IP addresses.
Can PHP also find the local IP address for a visitor on this network?
See previous answer.
You see, everything is very vague and basically based on assumptions. You cannot receive reliable information, and I am very glad that we are not yet completely transparent.
Once we all use IPv6 , the whole story is different.