ajmZip Manager Tools for PHP/MySQL

Sample code demonstrates how easy it is to use.

Retrieve Zip Code Information:
 	  
<?php
 include ("include/ajzipmgr.php");
 $ajzip = new ajZipMgr();
 $ajRec = $ajzip->GetZipInfo($_POST["ZipCode"]);
 echo $ajRec->ZIPCode;
 .
 .
 .
 echo $ajRec->Latitude;
 echo $ajRec->Longitude;
?>  

 

Retrieve distance between Zip Codes:
           
<?php
 include ("include/ajzipmgr.php");
 $ajzip = new ajZipMgr();
 $dist = $ajzip->GetDistance($zip1,$zip2);
 .
 .
 .
?>  
Retrieve Zip Codes within a radius:
           
<?php
 include ("include/ajzipmgr.php");
 $ajzip = new ajZipMgr(); 
 $radius = 10;  //radius in miles     
 $ajRecords = $ajzip->GetNearByZips($zip1,$radius");
 foreach ($ajRecords->zip as $ajRec) {
     .
     .
     .
 }
?>            
     

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright ©2004-2007 ajm Software, LLC. All Rights Reserved.

Back to our Home Page
Contact Us