Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Setting a cookie in the header of a request
I'm working on an ecommerce site and here's what I'm trying to do:
1. Set the value of a cookie in the header of a request to open a file from another domain. This could be done using fsockopen, a HTTP request, SoapClient or XMLReader but not cURL. Does anyone have any ideas how I could achieve this?.
2. The file I am accessing creates a cookie itself, but only if it doesn't already exist. The purpose of passing the cookie value in step 1 is so that this cookie and it's value will already appear present and so the response will contain either
(a) the value of the cookie passed in step 1 OR
(b) the value of the cookie just generated by step 2
I'm pretty stuck and any help on this today would be very very much appreciated.
Thanks a lot!
0 · ·