You can't block it.
There's ways, of course, to make it more difficult. Child protection programs on the computer and his phone, etc. But he'd quickly learn how to break them, and it's very easy.
You would have better results by stopping him using the computer or his phone at all. But even then he'll probably just use works computers (you'd be surprised how many people do!) or a friends laptop, or buy a laptop or tablet, and a new phone, or use a friends phone. And eventually he'd need access to a phone or computer again, and he'd access porn, and you'd be back to the beginning.
It's very similar to alcoholics. You can hide the alcohol (by god I've tried, my childhood was spent hiding alcohol, knives, food, medication) but you can't stop them getting more, or drinking it out, or using someone elses'. He'll just get sneakier, and you'll see less. He has to want to do it himself. And saying that he can't is a cop-out. He can. It's him that makes him type it in, and it's him that looks at it, and it's him that responds to it. He can stop, and he can get help to stop from his GP if he needs a support network, but you can't make him.
If this is marriage breaking already and he hasn't stopped, I don't fancy his chances. It sounds like he just doesn't care enough to want to stop. He either doesn't believe you'll walk, or he doesn't care.