+ 1

Location based website with php and mysql

we are given with a project to do, localised job search. where employer sign up with his detail and employee post job ad with his details .the location in detail and ad are matched to show nearest jobs. how to create with PHP and MySQL ? how to fetch and compare data from database? can any one help me where to start and step by step procedure?

1st Mar 2017, 4:44 AM
Amith Raj
Amith Raj - avatar
4 Answers
+ 2
Geocoding is basically a conversion from a readable address (e.g. "BlaBla street, BlaBla") into universal coordinates - latitude and longitude. It works similar to x and y coordinates, but a bit trickier( this planet is not flat ). In the docs, you can learn how to use this function in PHP or any other language. The basic flow is - 1) store coordinates of every object somewhere in the database, 2) Geocoding user input into coordinates 3) Select nearest objects from the database using simple mathematical formula to calculate the distance. 4) Profit! http://stackoverflow.com/questions/27928/calculate-distance-between-two-latitude-longitude-points-haversine-formula
1st Mar 2017, 9:20 PM
spotbot2k
spotbot2k - avatar
+ 1
You can use geocoding before storing into dB and then select it by distance. Google offers geocoding API, so does OpenStreetMap and MapQuest and so on. Mostly with code snippets and docs. https://developers.google.com/maps/documentation/geocoding/
1st Mar 2017, 6:06 AM
spotbot2k
spotbot2k - avatar
+ 1
https://code.sololearn.com/wsp5sZMe9mLH You can use google as an alternative to OSM
9th Mar 2017, 12:53 PM
spotbot2k
spotbot2k - avatar
0
can you explain it in detail with example with this question?
1st Mar 2017, 9:15 AM
Amith Raj
Amith Raj - avatar