opmrcrab 5 Newbie Poster

I have implemented google maps for customers to use on a number of websites, however I am looking for an PHP API to do server side checking/validation etc, does anyone know of such an API?

Geo-coding is not neccisary but an API where I can get the center point of two long/lats (say CA,USA and Japan) as the short/correct (over the pacific) not the long way (over the atlantic) would be preferable.

I might just not know the right keywords to find this kind of API, so any sort of advice would be very welcome :)