digitalcrazy Posted February 2, 2003 Posted February 2, 2003 Hi everyone, :D I came across this site today,very new. Unsure of price comparisons for US deliveries but it looks ok for Australian shipments from the US. Hope someone can use it! :wink: Have a look around,other codes available as well. Regards, Mark. Heres the link: http://www.intershipper.com/scripts/Inters...te/MainPage.jsp #Define the number of packages in quote $TotalPackage = 1; #Variable Below are variable to a given quote and static #to a given package within a quote #syntax variable_name(package_number) = value $boxid1="box1"; $weight1=10; $wunit1="LB"; $length1=12; $dunit1="IN"; $width1=12; $height1=12; $packaging1="box"; $contents1="otr"; $codvalue1=25000; $insvalue1=50000; #Assemble QueryString $strQueryString = "TotalPackage=$TotalPackage&userid=$userid&password=$password&classofservice1=$classofservice1&classofservice2=$classofservice2&classofservice3=$classofservice3&classofservice4=$classofservice4&carrier1=$carrier1&carrier2=$carrier2&carrier3=$carrier3&carrier4=$carrier4&delivery=$delivery&pickup1=$pickup1&origpostal=$origpostal&destpostal=$destpostal&boxid1=$boxid1&weight1=$weight1&wunit1=$wunit1&length1=$length1&dunit1=$dunit1&width1=$width1&height1=$height1&packaging1=$packaging1&contents1=$contents1&codvalue1=$codvalue1&insvalue1=$insvalue1&Submit=Get+Quote"; #Send Query String to ShipFlex Server use IO::Socket; my $host="www.intershipper.com"; my $getstring="GET /scripts/Intershipper/IntershipperXML.jsp?$strQueryString HTTP/1.0rnrn"; my $sock = new IO::Socket::INET(PeerAddr => $host, PeerPort => 80, Proto => 'tcp') or die "couldn't connect"; print $sock "$getstring"; my $buf=""; while($line = <$sock>) { $buf.=$line; } close($sock); #Use any XML package to parse $XMLString $XMLString = $buf; print "Content-type: text/html012012"; print "host = '$host'<br>"; print "getstring = '$getstring'<br>"; print "<textarea cols=100 rows=10>$XMLString</textarea>";
Recommended Posts
Archived
This topic is now archived and is closed to further replies.