> >
> >
> > 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]