[ic] LWP::UserAgent
Frank Reitzenstein
frank at aussievitamin.com
Thu Mar 10 16:40:29 UTC 2011
Hello,
I created my own usertag like your ups shipping tags for use in AU.
This section retrieves the shipping charge from Australia Post based on
weights and postcodes:
my $return;
my $error="OK";
my $content;
my
$url="http://drc.edeliver.com.au/rateCalc.asp?Height=$height&Length=$length&Weight=$weight&Width=$width&Pickup_Postcode=$origin&Destination_Postcode=$zip&Country=$country&Service_Type=$modex&Quantity=1";
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->timeout(5);
$ua->env_proxy;
my $aus_post=0;
my $response =$ua->get("$url");
if ($response->is_success)
{
$content = $response->content;
}
else
{
$aus_post=1;
}
$content used to return Australia post's web page which looks like this:
http://drc.edeliver.com.au/rateCalc.asp?Height=420&Length=210&Weight=100&Width=460&Pickup_Postcode=6076&Destination_Postcode=298128&Country=KE&Service_Type=AIR&Quantity=1
But now it returns "".
What could blocking my code form the internet?
Regards,
Frank Reitzenstein.
More information about the interchange-users
mailing list