Reputation: 6291
In my script I need to send data to a page via HTTP post method ,and server will set some cookie and it will send it back to me..For further requests i need to use this cookie for server access..I wrote a function for this,using stream_context_create() and file_get_contents() But I am not able to send cookies .I suspect whether the problem is because I'm not able to send cookie path and date along with cookie.So can anybody solve this issue.I dont need a CURL based solution My function is given below (I am pasting it in pastebin,because here I have indentation problems) http://pastebin.com/QQ1GxzdY
Upvotes: 0
Views: 300
Reputation: 11
i think stream_context_create() and file_get_contents() is file stream.So you can haeder cookie first then use stream_context_create() or file_get_contents() do something.
Upvotes: 1