Client in PHP

I created this client a bit simplified in PHP, which I want to share.