A Pennsylvania man has been sentenced to 10 years in federal prison for attempting to entice a minor online for prostitution.