Could it have been IST/TK? In which case the OP could have got the visa online while airside:
The Electronic Visa (e-Visa) Application System was launched on 17 April 2013 by the Ministry of Foreign Affairs of the Republic of Turkey. This system allows visitors travelling to Turkey to easily obtain their e-Visas online (
www.evisa.gov.tr), in approximately three minutes.
It is possible to obtain e-Visa 7/24 at everywhere with internet connection. The applicants can obtain their visa after they fill in the necessary information concerning their identity, passport and travel dates and pay visa fee online.
http://www.mfa.gov.tr/visa-informati...eigners.en.mfa