English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want the IP address so I can look up thier geographic location (which I also dont know how to do). Once I know where the request is coming from I can dynamically build the page to be more personalized for the user. I know I need to run this server-side, and I know that the server knows where the page is being requested from-- but I only know client-side languages, so I need help. I need the IP address for a couple different scripts I plan to write for the site Im making. So I really need to figure out how to get it. I'll eventually need to format the IP address after its pulled in order to use it, but for now I'll take it any way I can.
If you can help me then please leave me an answer or email me (joseph.181@osu.edu) . That's the account I actually use. Any help is appreciated.

-Aaron

2007-01-23 10:16:13 · 2 answers · asked by bonesawosu 2 in Computers & Internet Programming & Design

2 answers

Depending on what server-side language you are using... here's a few common ones:

ASP: Request.ServerVariables( "REMOTE_ADDR")

ASP.NET: Request.UserHostAddress

PHP: $_SERVER["REMOTE_ADDR"]

Go to http://www.maxmind.com/app/country/ - their service maintains a comprehensive and up-to-date geographic IP breakdown by country. It is $50 to license and $12/month for updates to the list.

2007-01-23 10:51:40 · answer #1 · answered by Rex M 6 · 0 0

Google: "asp, server, ip" or "remote_addr"

http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=577

If you are running Windows IIS, you can use ASP to extract the "REMOTE_ADDR" variable.

Also, try www.asp101.com for samples.

--cSc

2007-01-23 10:36:58 · answer #2 · answered by cSc 2 · 0 1

fedest.com, questions and answers