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

From: Date: Thu, 06 Sep 2001 20:21:26 +0000
Subject: Re: Tracking shipments UPS, FEDEX, etc...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66271@lists.php.net to get a copy of this message
I don't want the rate, I have that through a 3rd party shipping engine... it's the tracking info I need... unfortunately not just for UPS... FedEx, DHL, Airborne, etc...At 03:09 PM 9/6/2001 -0500, Christopher CM Allen wrote:
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>";
                                               }
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#66271) next »