An ex-Corpus Christi police officer has been sentenced to more than 13 years in prison for having an improper online and sexual relationship with a girl.