简体   繁体   中英

php curl cookies cache

I built a php script which register/login on a website through cURL functions. Anyway, it is working great on my local xampp server but when mpoving it on my online hosting I am getting a problem with the cookies. After running the script first time the cookies are getting cached and the second time I try to run the script I'm getting an error from the website I try to login because of Already logged in or similar. I tried to delete the text files where the cookies are stored, I tryed using different computers, IP's, browser but nothing seem to work. I need to wait 3-4h until the cookies expire. So my question is: Can cookies somehow be cached by the server ? On my local server it is working just perfect. Thank you !

Could you provide your code?

First thing I'd check is to make sure you're actually writing the cookie properly on the server and that you can read it as well.

Also you can use curl_error() to see what errors cURL is returning. See what you find by printing that out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM