How to connect to a public node through json RPC?

I found a list of public bitcoin nodes here. I'm using a php library. How can I connect to these nodes through JSON RPC? Is it safe to connect to public nodes? What should I give as username and password?

I tried a bitcoin node in my instance of EC2. It's taking too long to synchronize and the blockchain size is also increasing. I want to communicate with the bitcoin network without running a bitcoin daemon.