How to determine if the flight segment is transatlantic or transpacific in PHP?
<p>Given the airport code for the origin and destination region of a flight I need to determine if this flight segment is transpacific or transatlantic. </p>

<p>This is the psuedocode of the best solution I came up with so far.</p>

<p>1.determine the country and the continent(region) of the airport codes. 
2.If the origin region is America and the destination region is Europe or Africa or vice versa, the flight segment is transatlantic. 
3.If the origin region is America and the destination region is Asia-Pacific or Australia or vice versa, the flight segment is transpacific.</p>

<p>I am not 100% confident of this algorithm. </p>

<p>Can anyone recommend an algorithm, a webservice or any kind of tool to determine if a flight segment is transpacific or transalantic? I am using PHP.</p>
