Confused....

Hello, I live in South Africa. I met a man online. We have been chatting 4 month. He told me he is divorce since 2011 and he has two children. He would live to visit but can not because he needs to pay alimony before he can travel. On the 20 June he sent me a message saying he is appearing in court for bit paying alimony he told me not to worry cause his ex-wife did not ban the session. He told me the trial will be at 11am and the verdict will be at 11:35pm. After that I heard nothing if him. I received a message from his friend a week later telling me he is in prison and will be there for two months, he needs money to come out of prison cause he is sick. Can all this be true. Very confused though. Please advise.

Sounds like a scam to me.
I suggest you do not send any money and terminate the online relationship.

If you send money once, then when he gets out of prison( if indeed he ever went to prison in the first place )  He will be asking for more.