This is my kind of gear...
You've hit my nail, right ontop of my head...
I have made some feature similar to this for Australia..
I am using a federal government operated index of every registered
landmark, train station, suburb, river, etc that stores the geographical
position [latitude and longtitude]
And I use this in conjuction with an equation of Approximate Episoidal
Distance to calculate to a fairly high degree of accuracy [200m to
500km] the distance between to given points.
To figure out the items between said centre location and given radius
though requires a bit of calculation.
simply because in order to determine which 'elements' fall within given
range you have to compute live the distance between requested location
and each element stored in db.
Somewhat painful therefore it is wise to somehow use other filters as
well to choose what type of business/ etc
I know this sounds somewhat inefficient, and therefore the only other
way to simplify this is either to cache queries so any future queries
that match the same source and range will save the processing and just
display this results
Again though depending on your business rollover these results may
expire quickly and it isn't all that likely that given the timeframe you
might set that another person might run the same range and source query
Therefore if you could conjure up sone form of indexing system to
categorise quickly locations against a given reference point perhaps?
For example break down locations in terms of "blocks" or something and
then you can just perform this operation on any business that falls
inside the block of the requested source location and adjacent blocks
I have attached a library i wrote for my geolocate system on a site I am
currently developing.. Its a start point to the implementation
Of course you'd have to find where you can source a fairly up to date
extensive postcode/zipcode/suburb database that links to geographical
points to do this.
Enjoy.. and Good luck!
p.s. As a side note, I am not aware fully of American systems, and I do
believe there are already in place some fairly comprehensive systems to
do zipcode/locational distance calculations. Alot easier than I had to
do in Aus.
---oOo--- Allowing users to execute CGI scripts in any directory should
only be considered if: ... a.. You have no users, and nobody ever visits
your server. ... Extracted Quote: Security Tips - Apache HTTP
Server ---oOo--- ------oOo---------------oOo------ Julien Bonastre
[The_RadiX] The-Spectrum Network CEO ABN: 64 235 749 494
----- Original Message -----
From: "Matty Sarro" <[EMAIL PROTECTED]>
Sent: Sunday, February 05, 2006 8:17 PM
Subject: [PHP-DB] First web app, ever, so please bear with me
Greetings all! I am finally taken the plunge and started trying to
web application. I've got a fair amount of web design experience with
straight up HTML, I've written a few scripts with perl, and I'm slightly
familiar with SQL. This is to give you some background... I'm by no
experienced so please bear with me.
Currently I'm using a forum to gather business reviews from subscribers
website. Once a substantial number have been gathered, I want to use
populate a database that can be appended to by users.
The actual application (once data has been migrated) will have two uses:
first, users should be able to search by geographic area for businesses
based on zip code, town name, business name, distance from a given
etc. If a certain field isn't filled in, it should be assumed to be a
wildcard (for instance, if a user would enter no business name, or town
name, but they do enter 10 mile radius from 90210, then all businesses
within 10 miles of 90210 that have reviews will be displayed).
I'd like to use a similar form to allow users to submit reviews for new
Most of this may seem pretty simple, but like I said, I've never worked
PHP before, or SQL, let alone both. And whats worse, I've got no idea
do anything with the geographical code (the X mile radius from zip code
thing). So, where would be a fair place to get started (besides the
I hope this wasn't too vague - thanks again guys! Also, this is my first
post, so please be gentle :)
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date:
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 4/02/2006
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php