#!/usr/bin/perl


## set $user and $pass according to your account.

$user= "";
$pass= "";
$host= "www.pdns.de";

$addr = &getip($host);
print $addr."\n";
use IO::Socket;

$socket = new IO::Socket::INET (PeerAddr => $addr, PeerPort => 7788, Proto => 'tcp' );

print $socket $user.":".$pass."\n";
close($socket);

exit(0);

sub getip
{
my $host = @_[0];
my $ip;
my ($name, $aliases, $addrtype, $length, @addrs) = gethostbyname($host);
 foreach $i (@addrs) {
 my ($a, $b, $c, $d) = unpack('C4', $i);
 $ip = $a."\.".$b."\.".$c."\.".$d;

 }
 return $ip;
}