Login   Register  
PHP Classes
elePHPant
Icontem

File: ziptest.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2002-04-05 04:32
Size: 444 bytes
 

Contents

Class file image Download
<?php
include_once ("db_mysql.inc");
include_once (
"phpZipLocator.php");

$db = new db_sql;

$zipLoc = new zipLocator;

$zipOne 12345;
$zipTwo 23456;

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

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

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

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

?>