Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I want to get the correct IP address (and if possible, hostname) for my computer ... how do I get my real IP (which is currently 206.62.155.15)?

Since you say "currently", I'm going to assume that your address is assigned dynamically by your ISP/DSL/Cable provider.

The way I attack this problem is by periodically pinging a hidden CGI on my external web site. The CGI records the REMOTE_ADDR that pinged it, and responds with that REMOTE_ADDR. Then, from work, I can hit another hidden page on my site that tells me how recently my home machine reported in, and what IP address it used. (My DSL provider will drop the link after a few minutes of inactivity.) If the connection is still up, I can then reach it from the outside world.


In reply to Re: Getting net addy on localhost? by dws
in thread Getting net addy on localhost? by r.joseph

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2021-10-23 05:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (87 votes). Check out past polls.

    Notices?