[output_none] [var: 'licensecode'=(form_param: 'licensecode')] [inline: -database='nrgsoft', -table='daily_webservice', -keyfield='daily_id', -operator='eq', 'licensecode'=($licensecode), -operator='eq', 'date'=(server_date: -Extended), -operator='eq', 'client_ip'=(client_ip), 'service'='usps_track', -search] [if: (found_count) >= 1] [var: 'counter' = (math_add: field: 'counter','1')] [inline: -database='nrgsoft', -table='daily_webservice', -keyfield='daily_id', -keyvalue=(keyfield_value), 'counter'=($counter), 'last'=(Date_Format: (Date), -Format='%T'), -update] [/inline] [else] [inline: -database='nrgsoft', -table='daily_webservice', 'licensecode'=($licensecode), 'date'=(server_date: -Extended), 'counter'='1', 'client_ip'=(client_ip), 'client_type'=(client_type), 'result'='html', 'response_filepath'=(response_filepath), 'first'=(Date_Format: (Date), -Format='%T'), 'service'='usps_track', -add] [var: 'counter' = '1'] [/inline] [/if] [/inline] [/output_none] [if: ($licensecode) == '' && ($counter) > 100] Error - Unlicensed USPS tracking requests are limited to 100 per day by IP number.
Please contact NRG Software for pricing information and other service options.
[abort] [/if] Live USPS Tracking Results for tracking #'+$trackNumb+'\r'; // only get results if a tracking number is supplied. if: $trackNumb !=''; // build query for USPS Server // Get Tracking Data from USPS var:'query'=(encode_url: ''); var:'result'= (Include_URL: 'http://production.shippingapis.com/ShippingAPI.dll?API=Track&XML='+$query); var: 'xml' = (xml: $result); var: 'TrackSummary' = $xml->(ExtractOne: '//TrackInfo/TrackSummary/text()'); var: 'TrackDetail' = $xml->(ExtractOne: '//TrackInfo/TrackDetail/text()'); // Get Detail Data from USPS var:'query'=(encode_url: ''); var:'result'= (Include_URL: 'http://production.shippingapis.com/ShippingAPI.dll?API=TrackV2&XML='+$query); var: 'xml' = (xml: $result); var: 'status' = $xml->(ExtractOne: '//TrackInfo/TrackSummary/Event/text()'); // build a table of the info, modify as you wish // note: not all fields are always populated ''; if: (field: $TrackDetail) != ''; ''; /if; ''; '\r'; '
Track Summary:'+ $TrackSummary +'
Track Detail:'+ $TrackDetail +'
Status:'+ $Status +'

Provided as a service by NRG Software, LLC.
Submit feedback'; /if; ?>