I want User's IP Address stored in my access database and it showed in my website when user use my feedback page. I want to display message to user ("Your IP Address Is :") My site is built in ASP.NET (C#) and database in in Access. Please help me and send me the detailed code and where it to put on page. :worried::worried::worried: Thanks in advanced Please somebody help me
You can use this code PHP: Response.Write(Request.ServerVariables["remote_addr"]); or PHP: Response.Write(Request.UserHostAddress); hope it helped..
The following snippet gets the IP address of the machine from which the client visited the website. C# Code: string ipaddress; ipaddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (ipaddress == "" || ipaddress == null) ipaddress = Request.ServerVariables["REMOTE_ADDR"]; VB.Net Code: Dim ipaddress As String ipaddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR") If ipaddress = "" Or ipaddress Is Nothing Then ipaddress = Request.ServerVariables("REMOTE_ADDR") End If