How do I know if phbot works with the private server I play on?

It says on the guide page that it works with only some versions of sro : * vSRO 1.188/1.193/1.274, thSRO, Black Rogue, and cSRO SilkroadR are all supported.

How do I know which version the server I’m playing on is using?

Usually they tell you but most are 1.188. For private servers you need to use the testing release. It has many improvements.