Find freelancers. Lose those costly delays.

With 1.7 million freelancers, we'll match you with the perfect talent.

or, Register with Elance »

PHP, SQL, Mile Radius Search
Sign in to Add to Watch List

IT & Programming > Web Programming

View Change History

The client has made the following changes to the job.


Job awarded.

Jan 28, 2013

Job Description

  |  Change History >>


  • Posted: Mon, Jan 28, 2013
  • Time Left: Closed
  • Location: Anywhere
  • Client prefers freelancers from:

    You are still able to submit a proposal for this job.

    The client prefers freelancers from
    a different location.

    You're still able to submit a proposal for this job, regardless of your location.
  • Start: Immediately
  • Budget: Less than $500
  • Fixed Price Job
  • Elance Escrow Protection
  • W9 Not Required
Sign in to view client's details

I have a job that was done by someone else that I would up doing myself so I want to explain this as best I can. I have some php code for calculating the distances between to 2 points based on longitude and latitude. I also have one that is done in SQL which is off by a lot in miles.

I need to convert the old function to the new one using the old form:

  [obscured]  /admin/zip_search4.php

The new function in php looks like this:

$earth_radius = 3960.00; # in miles
$lat_1 = "47.117828";
$lon_1 = "-88.545625";
$lat_2 = "47.122223";
$lon_2 = "-88.568781";
$delta_lat = $lat_2 - $lat_1 ;
$delta_lon = $lon_2 - $lon_1 ;

function distance_haversine($lat1, $lon1, $lat2, $lon2) {
global $earth_radius;
global $delta_lat;
global $delta_lon;
$alpha = $delta_lat/2;
$beta = $delta_lon/2;
$a = sin(deg2rad($alpha)) * sin(deg2rad($alpha)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * sin(deg2rad($beta)) * sin(deg2rad($beta)) ;

Sign in or Register to see more

Desired Skills
MySQL Administration, PHP
Job ID: 37273977
Avg $ | High $ | Low $ — Show Pricing
  • Submit Date (Latest)

An experienced,dedicated and skilled programmer with passion to work on challenging projects.Customer satisfaction,simple,detailed and clean...
 0.0   |  Private   |  0 Jobs
Bid ID: 37275594  |  Submitted: Jan 28, 2013 12:32 ET 
Within 3 days

Thanks for taking a look at my profile. I am professional programmer with over 15 years of experience and excellent reputation. I have experience...
 0.0   |  Private   |  0 Jobs
Bid ID: 37275368  |  Submitted: Jan 28, 2013 12:27 ET 
Proposal SEALED

 Romania  |  
Web development, Mobile development, APIs, Web scraping and Social media, whatever you need we can provide and rise to the challenge.
 5.0   |  $11,885 Earnings   |  8 Jobs
Bid ID: 37274978  |  Submitted: Jan 28, 2013 12:17 ET 
Proposal SEALED
Elance is now an Upwork company.
Upwork is the choice of 4M+ clients. Get started working on Upwork today.
Are you ready to post a job like this one?
Post a Similar Job »