|
| |||||||||
| Tags: active server pages, asp, asp website, ip address, web designing, web development, website coding |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| ASP to display IP Address on Website
Hello to everyone. I am going to develop a website for a Tourism office as a project for my academic last year. I wanted to know that is it really possible to display to the viewer his/her IP address if they access my website? I am using ASP to develop the website. So if it is possible then can any provide a solution as to how can I displays the visitor's IP address? |
|
#2
| ||||
| ||||
| UserHostAddress() function to display IP Address
Yes, it is possible to display the IP-Address of the visitors to the website using ASP. ASP has a UserHostAddress() function which can be used to get the IP Address of the visitor. I have used the same in my project as well. Try the following code and see if the IP-Address of the visitor is displayed: Code: Dim strvisitip As String strvisitip = Request.UserHostAddress() Response.Write(strvisitip) |
|
#3
| ||||
| ||||
| Re: ASP to display IP Address on Website
The ASP language is very useful to design a website. You can make use of the ASP Script to output the internet address (also known as IP Address) of the website's visitor on your own website. Here is an ASP script that will help you to display the internet address of your website's visitor's: Code: <%
ipaddr = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
Response.Write("Internet Address is as follows: ")
Response.Write(ipaddr)
%> |
|
#4
| ||||
| ||||
| Re: ASP to display IP Address on Website
I have also worked on a website project recently and I had to learn ASP before working on it. We also had our website displaying the user's IP Address. We also used the ASP language to develop our website. Incase you simply just need to display the IP Address of the user then use the following ASP code: Code: Response.Write(Request.Servervariables("REMOTE_ADDR")) |
|
#5
| |||
| |||
| PHP to display IP Address on Website Code: Function ipclent() ipclent = Request.ServerVariables ( "HTTP_X_FORWARDED_FOR" ) If ipclent = "" Then ipclent = Request.ServerVariables ( "REMOTE_ADDR" ) End if End Function |
|
#6
| |||
| |||
| Re: ASP to display IP Address on Website
I have made use of the following ASP Script code to display the date and time on the website that I worked on. Code: Today's Date is: <%= Date() %> <BR> The Time now is <%= Time() %> Quote:
|
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "ASP to display IP Address on Website" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to open the website by using the IP address? | AlandraJ | Technology & Internet | 6 | 30-12-2011 10:24 PM |
| Website address of the Indian universities | P-chuha | Education Career and Job Discussions | 1 | 16-11-2010 07:25 PM |
| Add a contact folder and display it in the address book | wingeek | Tips & Tweaks | 1 | 06-02-2010 09:40 PM |
| How to find IP address of a website visitor | Bilal | Technology & Internet | 2 | 07-05-2009 04:17 PM |
| display and Red Cross problem on website | Bhuvan | Monitor & Video Cards | 3 | 28-03-2009 09:16 PM |