Skip to content

Commit

Permalink
Use hostip service to lookup global ip, whatismyip requires additiona…
Browse files Browse the repository at this point in the history
…l fixes
  • Loading branch information
Edmondas Girkantas committed Sep 28, 2012
1 parent 27c1953 commit 271b988
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion addons/dynamic_dns_client.pl
Expand Up @@ -10,14 +10,16 @@
my $login = 'username';
my $password = 'password';
my $domain = 'mydynamicdns.example.com';
my $ip_lookup_service = 'whatismyip'; # or 'hostip'
my $ip_lookup_service = 'hostip'; # or 'whatismyip'
my $verbose = 1;

my $poweradmin_url = 'http://example.com/poweradmin/';

# try to get client ip address using whatismyip service
my $ip_lookup_url;
if ( $ip_lookup_service eq 'whatismyip' ) {
# TODO: add user agent as described here
# http://www.whatismyip.com/faq/automation.asp
$ip_lookup_url = "http://automation.whatismyip.com/n09230945.asp";
}
elsif ( $ip_lookup_service eq 'hostip' ) {
Expand Down

0 comments on commit 271b988

Please sign in to comment.