PHP get visitor IP address and user agent
Tomorrow I’m going to make a small presentation and I need it the PHP code for getting the visitor IP address and the user agent (basically the browser). I know it’s not very difficult, but this is the kind of stuff you need thousands of times at hand and you look over and over on the web. So I’ll paste it here. Maybe tomorrow or the day after tomorrow I’ll need it again:
$_SERVER['REMOTE_ADDR'];
$_SERVER['HTTP_USER_AGENT'];
Advertisement
Leave a Comment