Web Hosting Talk







View Full Version : fsockopen and cookies


sasha
03-13-2003, 12:11 PM
I am using PHP fsockopen function to send POST and GET requests to some site, and that works really nice. The problem I am running into now is how to handle sessions/cookies on the remote site. I need to send cookie values back to the remote site using fsockopen, so I need some help to construct request header that contains this cookie. Any help is welcome.

<edit>
It is realy simple realy (now). Just add
Cookie: cookieName=cookieVal; cookieName2=cookieVal2
at the end of request string.

</edit>