Jump to content

[SOLVED] curl and saving sessions


chick3n

Recommended Posts

check out this article, it will probably get you all the way there:

 

http://www.frozenminds.com/disable-sessionid.html

 

I dont want to remove session ID's from my own server, the problem is when using CURL to return the web contents of another site it is attaching session ID's to the URL's, and for now i use a preg_replace to remove the session id's but i want to know if there is a way to do it through CURL itself, because with browsers when you goto a webpage you dont see the session IDs in the URL itself so how is it getting rid of them? Does it have to do with cookies maybe?

The only time session IDs are appened in the URL is when cookie support isn't allowed server side or client side. Set up your curl requests to use cookies.

 

Ive added

curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile); 
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile);

and it seems to have sold it, thx.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.