springo Posted April 30, 2007 Share Posted April 30, 2007 Hi, I'd like to know if it's possible to do this. I mean set it in the server, not in a visitor's browser. Thank you for your help. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted April 30, 2007 Share Posted April 30, 2007 There is no server-side cookie in HTML. If you use PHP then you can use sessions. Sessions are stored on the server and not the client. However PHP still sets a cookie that stores a session identifier which PHP uses to serve the correct session when a person visits your site. Quote Link to comment Share on other sites More sharing options...
springo Posted April 30, 2007 Author Share Posted April 30, 2007 I think I didn't make myself clear enough. I need the server to have that cookie so that a PHP script gets the right file when I use file_get_contents($URL). The other server needs that cookie to provide the file I want. So the server doesn't store a cookie for its script, but rather the one executed on another server when I request the file. If there are no server-side cookies, can I do this somehow? Thanks again. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted May 1, 2007 Share Posted May 1, 2007 There is no "server side cookie", especially cookies that can shared over multiple sites/servers. You will probably have to create your own simple cookie script for what you want to do. As a side note, I don't know whether this might help but have a look into cURL. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.