I'm developing an application that does a remote login, amongst other things, via cURL.
The remote site gives out a session cookie, which I can store in my cookie jar.
I want each user to my site to have a unique session on the remote site. My application works fine with just one user (me), but I'm not sure how to make it multiuser.
My first thought is to set a session variable for my application users, then use this variable as the name of the cookie jar, but this seems ugly.
Is there any built-in PHP/cURL functionality that will pass the unique session from the remote server to my users?
Many thanks for any help.
Jack
Your question has every element of a solution, namely cookie jar and sessions.
When you provide the cookie jar file to CURL simply give it a name according to your user, example:
Important: Be sure to hide that folder (maybe store it outside your document root).