Getting user information...

R

RAB

When an anonymous user visits my website what basic information can I
gather about them? I thought I read somewhere that I could get the
name of the server that is requesting my website http code? If this
is the case what would be some VB code code to capture this
information in a string variable?

Thanks in advance,
RABMissouri2007
 
G

Guest

When an anonymous user visits my website what basic information can I
gather about them? I thought I read somewhere that I could get the
name of the server that is requesting my website http code? If this
is the case what would be some VB code code to capture this
information in a string variable?

Thanks in advance,
RABMissouri2007

You can get the client IP address, name of the browser (User-Agent)
and a previous site visited by the user, that linked to your site
(Referrer).

' IP Address
_UserHostAddress =
HttpContext.Current.Request.UserHostAddress.ToString

' Browser
_UserAgent = HttpContext.Current.Request.UserAgent.ToString

' Referrer
_Referrer = HttpContext.Current.Request.UrlReferrer.ToString
 
M

Mark Rae [MVP]

client IP address
HttpContext.Current.Request.UserHostAddress.ToString

So easily spoofed (via proxies or other methods) these days...
name of the browser (User-Agent)
HttpContext.Current.Request.UserAgent.ToString

Several browsers are now capable of pretending to be different browsers...
previous site visited by the user, that linked to your site
HttpContext.Current.Request.UrlReferrer.ToString

More and more ISPs are stripping this off...

Not really worth bothering with...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top