Calculate distance between two locations by Latitude and Longitude

May 22, 2015 Iyngaran Iyathurai 0

The following code returns the distance between to locations based on each point’s longitude and latitude. Passed to function: lat1, lon1 = Latitude and Longitude of point 1 (in decimal degrees) lat2, lon2 = Latitude and Longitude of point 2 (in decimal degrees) unit = the unit you desire for results where: ‘M’ is statute miles (default) ‘K’ is kilometers ‘N’ is nautical miles   PHP Code


Reference Links  

How to Manually Add a WordPress Administrator to the Database using SQL Queries

May 19, 2015 Iyngaran Iyathurai 0

In a recent WordPress hack attack which we worked on and recovered, the owner’s WordPress administrator account was demoted to a user role, therefore the owner did not have any control over the WordPress installation. To regain back access to WordPress, we manually created a new WordPress user with an Administrator role directly in the database.   In this tutorial I will show you how to manually create a WordPress administrator in the WordPress database […]