Setting a cookie in the header of a request - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Setting a cookie in the header of a request

legacyelegacye Posts: 42Member
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!
Sign In or Register to comment.