Re: Tracking shipments UPS, FEDEX, etc...

From: Date: Thu, 06 Sep 2001 20:09:30 +0000
Subject: Re: Tracking shipments UPS, FEDEX, etc...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66269@lists.php.net to get a copy of this message
> > > > > > has anybody written any routines or functions they'd care to share for > > parsing the tracking information out of UPS, FEDEX, or other shipping > > carriers tracking pages? > > /* Begin FEDX GROUND */ $fp = fopen ("http://grd.fedex.com/cgi-bin/rrr2010.exefunc=Rate&Screen=Ground& OriginZip=$orig_zip&OriginCountryCode=US&DestZip=$new_zip&DestCountryCode=US &Weight=$w_total", "r"); if(!$fp) { echo "Didnt open <br> $errstr ($errno)<br>\n"; } else { fputs($fp,"GET / HTTP/1.0\n\n"); while(!feof($fp)) { $buffer=fgets($fp,100); if ( ereg "^(<\!TotalCharges>)([0-9]{1,4})(\.)([0-9]{1,})", $buffer, $regs)) { $fee .=$regs[2]; $fee .=$regs[3]; $fee .=$regs[4]; } echo "<center>The Shipping Fee is $fee<br>"; }

« previous php.general (#66269) next »