Home     Articles & Projects     Products & Web Services

PHP GeoLocation

Hi guys,
trying to work out the following
I have created a list of GeoLocations and I would like to create a simple system that tells me if a person is inside the area of the GeoLocation I have set for e.g.

If a person it in the area of
144.30'39.82/-38.16'22.00 by with of 144.31'12.99/-38.16'16.20
by
144.30'41.77/-38.16'37.09 by with of 144.31'12.74/-38.16'33.05

so if a person is in that area I want to show that info.

I have the script that collects the GeoLocation but not away to know if a person is in an area.

Just thought this might help

Just thought this might help a picture of the location with the area I want to know if people are in

http://bonush.com/bannerads/beach.png

I am thinking something like

I am thinking something like this will work what do you think

<?php
$user
= "-38.843489,145.334909";

if(
$user > "-37.853489,145.134909" && $user > "-37.973489,145.334909" && $user < "-38.873489,145.134909" && $user < "-38.873489,145.334909")
{
print
"You In the AREA";
}
else
{
print
"NOPE";
}
?>

I find this script and it

I find this script and it works fine, but when I put lat/long locations in it it return false when it should return true can someone take a look please.

{code saved}

Hi Russell, Thanks - i've

Hi Russell,

Thanks - i've grabbed a copy of your code and I'll take a look for you...