469,362 Members | 2,498 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

PHP script to show IP, Location, OS name/version/platform, Browser name/version

Does anyone have a script for this?
I want to use it to put these things into a logfile or db.

Thanks

Sep 3 '06 #1
4 20593
GrumPlayer wrote:
Does anyone have a script for this? I want to use it to put these things
into a logfile or db.
Take a look at

http://us2.php.net/manual/en/reserved.variables.php

$_SERVER won't give you all of this information, but it will probably give
you enough to derive the rest.

HTH,
--
Benjamin D. Esham
bd*****@gmail.com | AIM: bdesham128 | Jabber: same as e-mail
How to Ask Questions the Smart Way, by Eric S. Raymond:
http://catb.org/~esr/faqs/smart-questions.html
Sep 3 '06 #2
GrumPlayer <be********@gmail.comwrote:
Does anyone have a script for this?
I want to use it to put these things into a logfile or db.

Thanks
http://wettone.com/code/slimstat

All the things you want, in PHP, and puts everything in a db

Peter

--
http://www.boosten.org

Mail: peter at boosten dot org
Sep 3 '06 #3
NC
GrumPlayer wrote:
>
Does anyone have a script for this?
User's IP address is avaialble as $_SERVER['REMOTE_ADDR']. Location
has to be deduced based on the IP address (Google for GeoIP), and
deduction will not be perfect, since you will be shown the location of
IP block owner (for example, it is likely that all AOL users will be
identified as located in Virginia). OS name/version/platform and
browser name/version can be parsed out of $_SERVER['HTTP_USER_AGENT'].

Note, however, that browsers are not required to submit any of this
information in an HTTP request. Additionally, some browsers can be
configured to submit custom information rather than true one.

Cheers,
NC

Sep 3 '06 #4

GrumPlayer wrote:
Does anyone have a script for this?
I want to use it to put these things into a logfile or db.

Thanks
See http://fi.php.net/get-browser also.

Sep 4 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Web Master | last post: by
6 posts views Thread by S P Arif Sahari Wibowo | last post: by
4 posts views Thread by thanos | last post: by
5 posts views Thread by YaoBao | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.