How to automatically alert your users about events happening in their area

This can be easily done if you are already geocoding users addresses (i.e. getting their latitude and longitude) while they register on your website. If you are not doing so then you can go back and geocode all the previous addresses. Now lets assume you have geocoded all the addresses and are storing them in a separate table as shown below Table: user_lat_long [crayon-59c7ed2c6d2cb119289607/] Now create a function to get users from the above table near a certain address (where the event is to be held). [crayon-59c7ed2c6d2d6314821908/] Now just call the above function with 3 parameters as input Radius => Defines the area you want to set to alert your users e.g. 100 KM Latitude => Latitude of the place where the event is to be held Longitude => Longitude of the place where the event is to be held [crayon-59c7ed2c6d2db060483227/]  ...
Read More