I agree with yetisharemods. There's no good way to get it within PHP. We've spent a lot of time (about 5 days in total!) looking into a solution which will work for everyone and there doesn't seem to be one which is robust and secure enough to use.
The only real way to do it would be setting up...