Solved

Need html code to show ip and port

Posted on 2006-07-18
7
463 Views
Last Modified: 2008-01-16

Hi, I was wondering if some of you HTML guru's can write up a quick html code for me. ALl I need is to show the connecting IP address and the port. Any other ip-related info in the code would also help alot.

For example if you went to ip.html it would show:

Your IP Address is: 71.254.31.254 on port 443
0
Comment
Question by:SANG501
7 Comments
 
LVL 18

Expert Comment

by:Eternal_Student
ID: 17131270
You would need to use php or a servlet server side .. html cannot do that.
0
 
LVL 1

Author Comment

by:SANG501
ID: 17131291

Damn, no problem, I can use anything as long as I can run it from IIS.
0
 
LVL 12

Expert Comment

by:ShaneJones
ID: 17131295
Hi jmanGJHS97,

http://www.hypergurl.com/ipsniffer.html

has the IP address code

tells you the IP Address, the ISP

ShaneJones
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 1

Author Comment

by:SANG501
ID: 17131430
It would be nice if it was embedded in the webpage along with the source port. The purpose of this is to load balance web servers so I can see which application I am hitting. I will up the points for any good code.
0
 
LVL 16

Accepted Solution

by:
ThinkPaper earned 500 total points
ID: 17132523
not exactly sure if this helps you but.. (in asp)
http://www.4guysfromrolla.com/webtech/092298-3.shtml

<html>
<head>
<title>my page</title>

</head>

<body>
<TABLE>
      <TR>
           <TD>
                <B>Server Variable</B>
           </TD>
           <TD>
                <B>Value</B>
           </TD>
      </TR>

      <% For Each name In Request.ServerVariables %>
      <TR>
           <TD>
                <%= name %>
           </TD>
           <TD>
                <%= Request.ServerVariables(name) %>
           </TD>
      </TR>
      <% Next %>
</TABLE>
</body>

</html>
0
 
LVL 1

Author Comment

by:SANG501
ID: 17132899
This looks promising, ASP is ideal. I will give it a try and let you know.
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 17136625
You can easily get the IP address (unless it is blocked that is) but the only port you're gonna get is the server port..

So for example:

<html>
<head>
<title>Test page</title>

</head>

<body>
Your IP-address is: <%= Request.ServerVariables("REMOTE_ADDR") %>, the server is on port: <%= Request.ServerVariables("SERVER_PORT") %>
</body>
</html>

Regards,
Max.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now