PHP curl post to login to wordpress


Staff member
I am using php curl to login to wordpress behind-the-scenes as described here:
<a href="">Wordpress autologin using CURL or fsockopen in PHP</a>

However my script is not setting the cookies necessary to retain the wordpress session. Instead they are being sent back to my script and stored in cookies.txt.

Both the curl script and the wordpress login are on the same server in different directories.

Do I need to write another curl script to manually set the wordpress cookies? Is that possible?