Automatic logging to the dreamhost panel

Hello there.
I’ve tried to log into the with php script using Curl lybrary. It doesnt work somehow. I tried all possible ways. But it shows the same:
"Cookies are required to log in. Please check your browser settings."
though I’m 100% sure they are on and curl uses its cookiefile and cookiejar methods.
The script of mine works on other sites requiring cookies but doesnt on this panel.

Please tell me what am I doing wrong? Maybe someone already had similar problem and have an idea or other way to log in automatically with PHP.

All posts will be greatly appreciated.
Thanks in advance.