bert huygens <[EMAIL PROTECTED]> writes:

> Dear All,
>  
> is it possible in Perl to find the outside ip-address from an adsl-router 
> without using an outside box.
>  
> i need to restart a script when the outside address of the router changes 

Don't think you can get it without hitting a remote machine.  Unless
the router itself can be queriedd for it.

You could put the small cgi script on a web server somewhere and hit
it with:

  lynx -dump http://remote.server.com/remadd.cgi

cat remadd.cgi

  #!/usr/bin/perl
  print "Content-type: text/html\n\n";
  print "REMOTE_ADDR = $ENV{'REMOTE_ADDR'}";

  print <<EOM;

  </BODY></HTML>
  EOM

lynx -dump http://remote.server.com/remadd.cgi
should return something like:

   REMOTE_ADDR = 69.44.143.256


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to