[aprssig] RE: APRS / findu.com / PERL help needed (final code)

Andrew Rich vk4tec at tech-software.net
Fri Nov 12 20:02:12 EST 2004


PERL code to connect to find.com, get a history, then send to ui-view on
port 1448


#!/usr/bin/perl
use Net::Telnet;
#
# Get the data
#
open (file, "> /var/www/html/vk4tec_stuff/aprs_history.txt");
my $host = "www.findu.com";
my $user = "";
my $password = "";
my $prompt = "";
my (@data, $line);
my $t = new Net::Telnet(Timeout => '5',port => '80');
$t->errmode('return');
$t->Net::Telnet::open($host);
print $t "GET /cgi-bin/raw.cgi?call=vk4tec-9&start=0&length=24&time=hour\n";
while (<$t>)
{
if (m/VK4TEC-9>RW/)
{
print ;
print file;
}
}
$t->close();
close (file);
#
# Send to UI-VIEW
#
open (file, "/var/www/html/vk4tec_stuff/aprs_history.txt");
my $host = "vk4tec.no-ip.org";
my $user = "";
my $password = "";
my $prompt = "";
my (@data, $line);
my $t = new Net::Telnet(Timeout => '5',port => '1448');
$t->errmode('return');
$t->Net::Telnet::open($host);
while (<file>)
{
@andy = split /,/;
print $t "$andy[1],$andy[2],$andy[3],$andy[4],$andy[5],$andy[6] \n";
}
$t->close();
close (file);





More information about the aprssig mailing list