[OZAPRS] RE: APRS / findu.com / PERL help needed
Hamish Moffatt
hamish at cloud.net.au
Sat Nov 13 11:57:32 EST 2004
On Sat, Nov 13, 2004 at 10:33:16AM +1000, Andrew Rich wrote:
> This works
>
> #!/usr/bin/perl
> use Net::Telnet;
> my $host = "www.findu.com";
Argh! Don't do that. Use libwww-perl, which will do proper HTTP requests
from Perl.
http://search.cpan.org/~gaas/libwww-perl-5.801/lib/LWP.pm
In your case you would need something like
#!/usr/bin/perl
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$req = HTTP::Request->new(GET =>
"http://www.findu.com/cgi-bin/raw.cgi?call=vk4tec-9&start=0&length=24&time
=hour");
$res = $ua->request($req);
print $res->content;
I tested this and it works..
Hamish
--
Hamish Moffatt VK3SB <hamish at debian.org> <hamish at cloud.net.au>
_______________________________________________
ozaprs mailing list
ozaprs at marconi.ics.mq.edu.au
http://marconi.ics.mq.edu.au/cgi-bin/mailman/listinfo/ozaprs
More information about the Ozaprs
mailing list