#!/usr/bin/perl
use CGI;
my $q = CGI->new;
print $q->header();
my $url = $q->param('url');
###
require LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->proxy('http', 'http://your_proxy_here:80');
my $response = $ua->get($url);
if ($response->is_success) {
print $response->content; # or do fancy stuff here
}
else {
die $response->status_line;
}
A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.