Login   Register  
PHP Classes
elePHPant
Icontem

File: ex1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mike Frank  >  Zip/Postal Code Lookup Class  >  ex1.php  >  Download  
File: ex1.php
Role: Example script
Content type: text/plain
Description: Example 1 - Lookup zip/postal
Class: Zip/Postal Code Lookup Class
Retrieve geographical location for given zip codes
Author: By
Last change:
Date: 6 years ago
Size: 282 bytes
 

Contents

Class file image Download
<?php
include 'class.geodata.inc.php';

// Compare the distance between two different zip/postal codes
$x = new EyeGeoData();
$x->query('M5X 1J2');

$y = new EyeGeoData();
$y->query('90210');

echo 
$x->calcDistance($yEyeGeoData::KMS2) . ' kms'// prints "6923.05 kms"