Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 3rd, 2005, 10:07 AM
Authorized User
 
Join Date: Dec 2004
Location: Multan, Punjab, Pakistan.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to shankhan Send a message via Yahoo to shankhan
Default How to get IP address

hi guyz,

I've developed a site using VB script. It is running fine. Now i want to trace users. Like i want to get the IP address of users who is querying or inserting the data. is there anyway that i can save the IP address of everyuser in my database.

waiting for ur suggestions

Zee

  #2 (permalink)  
Old March 3rd, 2005, 10:14 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Request.ServerVariables("REMOTE_ADDR")

Just save that to a table.

  #3 (permalink)  
Old March 4th, 2005, 07:15 AM
Authorized User
 
Join Date: Dec 2004
Location: Multan, Punjab, Pakistan.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to shankhan Send a message via Yahoo to shankhan
Default

Great ......... it is working fine.

Thanx friend

  #4 (permalink)  
Old March 4th, 2005, 01:57 PM
Authorized User
 
Join Date: Dec 2004
Location: Multan, Punjab, Pakistan.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to shankhan Send a message via Yahoo to shankhan
Default

Ok I got IP address of user. Now i want to get another thing that is user's computer name. can i get it like there is an object which returns us the IP address of user. and also tell me the others objects through which we can get the maximum information of user.

i shall be thankful to u.



  #5 (permalink)  
Old March 8th, 2005, 02:55 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Chennai, TamilNadu, India.
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Go through this link.You will get an idea..
http://msdn.microsoft.com/library/de...l=/library/en-
us/cpref/html/frlrfsystemwebhttprequestmemberstopic.asp

  #6 (permalink)  
Old March 10th, 2005, 02:59 PM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

how do you collect this data(Request.ServerVariables("REMOTE_ADDR")) or call it from a form? do i have to create a hidden field? am trying to place users ip into a access db.....here is what i placed into my form:
<INPUT type="hidden" name="REMOTE_ADDR" value="REMOTE_ADDR">

and here is how i attempted to place in db;

ipaddress=request.form("REMOTE_ADDR")
Request.ServerVariables("REMOTE_ADDR")
ipaddress = "REMOTE_ADDR"
ipaddress.add "ipaddress",request.form("REMOTE_ADDR")

ANY HELP IS APPRECIATED..THANKS

GREG

  #7 (permalink)  
Old March 10th, 2005, 04:18 PM
Friend of Wrox
 
Join Date: Jan 2004
Location: , , USA.
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

capture the IP address using Request.ServerVariables("REMOTE_ADDR"), you do not have to create a hidden field.
<%
Dim IPAddress
IPAddress = Request.ServerVariables("REMOTE_ADDR")
%>
and use that IPAddress in the SQL insert into clause
<%
Dim SQLString
SqlString = "INSERT INTO MyTable (IPAddressColumn) VALUES ('" & IPAddress & "')"

CommandObject.Execute (SQLString)

%>




Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me i must Get IP Address pla_2 C# 2005 2 October 12th, 2006 07:51 AM
IP Address sumanghosh Classic ASP Basics 1 April 7th, 2006 11:24 AM
How to track the IP address hums .NET Framework 2.0 5 October 20th, 2004 08:45 AM
Retreiving IP address & gateway address sjangit VBScript 0 February 3rd, 2004 02:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.