1. Go to this page and download the library: Download nickcheek/uspslookup library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nickcheek / uspslookup example snippets
use \Nickcheek\USPSLookup\USPSLookup;
$lookup = new \Nickcheek\USPSLookup\USPSLookup('XXXXXXXXX');
$find = $lookup->Address()->cityState('72019');
$zips = array('72204','72203');
$lookup = new \Nickcheek\USPSLookup\USPSLookup('XXXXXXXXX');
$find = $lookup->Address()->cityState($zips);
$lookup = new \Nickcheek\USPSLookup\USPSLookup('XXXXXXXXX');
$find = $lookup->Address()->zipCode('1234 Anystreet','','Little Rock','AR');
$lookup = new \Nickcheek\USPSLookup\USPSLookup('XXXXXXXXX');
$find = $lookup->Price()->getRate('72204','37501','1','3','Priority');