File: ziptest.php

Recommend this page to a friend!
  Classes of Dr Tarique Sani  >  php Zip Locator  >  ziptest.php  >  Download  
File: ziptest.php
Role: Example script
Content type: text/plain
Description: A file to test the class
Class: php Zip Locator
Locate near zip codes and distance between them
Author: By
Last change:
Date: 19 years ago
Size: 444 bytes


Class file image Download
include_once ("");
include_once (

$db = new db_sql;

$zipLoc = new zipLocator;

$zipOne = 12345;
$zipTwo = 23456;

$distance = $zipLoc->distance($zipOne,$zipTwo);

"The distance between $zipOne and $zipTwo is $distance Miles<br>";

$radius = 20;
$zipArray = $zipLoc->inradius($zipOne,$radius);

"There are ",count($zipArray)." Zip codes within $radius Miles of $zipOne";


For more information send a message to info at phpclasses dot org.