PHP Classes

File: ship.php

Recommend this page to a friend!
  Classes of Jay Powers   FedExDC   ship.php   Download  
File: ship.php
Role: Example script
Content type: text/plain
Description: Ship example
Class: FedExDC
Interface to FedEx Ship Manager
Author: By
Last change:
Date: 20 years ago
Size: 987 bytes
 

Contents

Class file image Download
<?php
include('fedexdc.php');

// create new fedex object
$fed = new FedExDC('FedEx ACC #','Meter #');

$ship_data = array(
    
75=> 'LBS'
   
,16=> 'Ma'
   
,13=> '44 Main street'
   
,5=> '312 stuart st'
   
,1273=> '01'
   
,1274=> '01'
   
,18=> '6173335555'
   
,15=> 'Boston'
   
,23=> '1'
   
,9=> '02134'
   
,183=> '6175556985'
   
,8=> 'MA'
   
,117=> 'US'
   
,17=> '02116'
   
,50=> 'US'
   
,4=> 'Vermonster LLC'
   
,7=> 'Boston'
   
,1369=> '1'
   
,12=> 'Jay Powers'
   
,1333=> '1'
   
,1401=> '1.0'
   
,116 => 1
   
,68 => 'USD'
   
,1368 => 1
   
,1369 => 1
   
,1370 => 5
);

// Ship example
$ship_Ret = $fed->ship_express($ship_data);

if (
$error = $fed->getError()) {
    echo
"ERROR :". $error;
} else {
   
// Save the label to disk
   
$fed->label('mylabel.png');

}


/* tracking example

$track_Ret = $fed->track(
array(
    29 => 790344664540,
));

*/



echo $fed->debug_str. "\n<BR>";
echo
"Price ".$ship_Ret[1419];

?>