Unprotected sex 8 days before period is due

Can you get pregnant if you have unprotected sex 8 days before period is due. I have a 23 days cycle and sometimes I have a period twice in one month. Has anyone ever got pregnant because of this. The 11th is when I had unprotected sex and he finished inside me. I know sometimes the app can be wrong.