Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

New Shipping site:May be handy for someone, php sample code


Recommended Posts

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.






Heres the link:






#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














#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>) {







#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>";

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...