Update: Nogenius warned me about a bug which I just crushed. GETs didn't work after POSTs. The fix is commented in the code. Search nogenius. Thanks!
I expanded the previous sample of Basic cUrl and PHP Usage and converted it to a class for easy further updates. I also added the headers processing which can be useful to handle cookies. It is now easier to use but basic PHP knowledge is required.