I am having a problem with my PHP script expiring cookies.
I'm using fsockopen to do a POST to a forum with the login details then using explode to grab the Cookie headers and after that using another fsockopen to do a GET to view a thread.
The problem is, the minute it logs in and takes the cookies, those cookies expire and no longer work on the second fsockopen.
I've tried manually logging in using my browser and taking the cookies and adding them to my GET fsockopen and it works well the first time but the minute you try the script again by refreshing or something, the cookie is expired and no longer works.
Is there a fix for this so PHP does not expire cookies? I'm guessing it's producing the same effect as me closing my browser which gets rid of session cookies.