A former South Texas high school teacher has been sentenced to more than nine years in federal prison for having child pornography at his home.