Currently creating a plugin with cURL and I need a place that will work for most WordPress servers (Unix or Windows) to store my cookie file. Anyone have a suggestion or best practices? I've been googling for a while now and I think I found something about wp_temp_dir, but googling that keyword gives me only a thousand and one results about solving some install error.
migrated from stackoverflow.com Mar 21 '11 at 6:55
Transients seem to be appropriate storage. Just note that if you will generate a lot of this and they will be disposable then you will need to cleanup old transients.
As for your cURL/filename issue - it is bad practice to use cURL directly in WordPress. WP provides HTTP API that abstracts remote requests.
Unfortunately it is bit poorly documented. As far as I understand you pass cookies in arguments array with
You could store cookies in transients. That way, its absctracted enough from the actual storage location that it should work across environments. Transients are stored in the wp_options table of the database by default, but can be memcached by plugins.