[wp-hackers] wp_remote_request Cookies - Getting URL as logged in user

Scott Kingsley Clark scott at skcdev.com
Mon Feb 28 18:57:52 UTC 2011

I'm experimenting with running wp_remote_request($url,$args) with the 
ability to pull the URL using a logged in user's cookies. Now the trouble 
is, I'll probably want to create a new user with a specific role for the 
site, get / build the logged in cookie associated for that user, and return 
that in the $args['cookies'] for wp_remote_request to utilize.

Has anyone used the $args['cookies'] variable in wp_remote_* much and if so, 
has anyone attempted what I'm trying to do (maybe not the unique new user, 
but perhaps instead -- the reading of the URL as a logged in WP user.

I'm also assuming $args['cookies'] should be an array of cookie key=value 

-Scott Kingsley Clark

More information about the wp-hackers mailing list