PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of MM Developer   GPS Coordinates Distance   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example usage of class.
Class: GPS Coordinates Distance
Calculate distance between geographic coordinates
Author: By
Last change:
Date: 17 years ago
Size: 407 bytes
 

Contents

Class file image Download
<?php

require_once ("gps_class.php");

//$distance = new calcMiles (Latitude coordinate of 1st position, Longitude coordinate of 1st position, Latitude coordinate of 2nd position, Longitude coordinate of 2nd position);
$distance = new calcMiles (89.98321, 21.951274, 89.44865, 22.65947, "miles");

$numericalDistance = $distance->lastResult;
$formattedResult = $distance->lastResultFormatted;

?>