For client's IP address: See this post For client's system details: you can get HTTP request header "user-agent" which contains information like browser-details, operating system etc.
Aside from the fact that the question was asked more than 2 years ago, it specifically asked about the client IP address in the context of a web app, something entirely different from what this code does.
Don't get me started about those stupid light bulbs.