Update api.php

Very first basic version of the API using the Haversine formula to get the distance between the requested position and the different stations