PDA

View Full Version : Is it possible to connect with API through Perl?



ensimek
03-16-2010, 11:28 AM
Hi,
Is it possible to connect with DA API using Perl? Can anyone paste some code, because I'am trying with no success.

Thanks

ensimek
03-16-2010, 12:28 PM
Wondering why:

$socket = IO::Socket::INET->new(PeerAddr => '127.0.0.1', PeerPort => 2222, Proto => 'tcp', Type => SOCK_STREAM) or die "Couldn't connect";
$socket->send("set_login('admin', 'password.8')\n");
while (defined($line = <$socket>)) {
print $line;
}
close($socket);

is giving Error 404, document not found

scsi
03-16-2010, 12:28 PM
http://www.directadmin.com/forum/showthread.php?t=26065

ensimek
03-16-2010, 02:01 PM
Thanks a lot, working well :)