_USPS_chkd(substr($data,8)); $data = '420'. $aZIP . '~191' . $aServiceType . $aDUNS . $aSeqNbr; return $data . $cd; } // Get type 2 of confirmation code (without ZIP) function GetPIC($aServiceType,$aDUNS,$aSeqNbr) { // Convert to USPS format with AI=91 $data = '91' . $aServiceType . $aDUNS . $aSeqNbr; $cd = $this->_USPS_chkd($data); return $data . $cd; } } $usps = new USPS_Confirmation(); $zip = '92663'; $service = '21'; $DUNS = '805213907'; $seqnr = '04508735'; $data = $usps->GetPICwithZIP($zip,$service,$DUNS,$seqnr); //$data = $usps->GetPIC('01','123456789','00000001'); $encoder = BarcodeFactory::Create(ENCODING_EAN128); $e = BackendFactory::Create(BACKEND_IMAGE,$encoder); $e->SetModuleWidth(2); $e->SetFont(FF_ARIAL,FS_NORMAL,14); $e->Stroke($data); ?>