chick3n Posted July 15, 2008 Share Posted July 15, 2008 basically when i use curl to grab a webpage, all the a href's contain session id's ex: ?s=2832832 or jsession=2231231 etc Is there any option to remove that? If you go with IE or FF and goto view source, that data doesnt exist. Link to comment https://forums.phpfreaks.com/topic/114877-solved-curl-and-saving-sessions/ Share on other sites More sharing options...
JD* Posted July 15, 2008 Share Posted July 15, 2008 check out this article, it will probably get you all the way there: http://www.frozenminds.com/disable-sessionid.html Link to comment https://forums.phpfreaks.com/topic/114877-solved-curl-and-saving-sessions/#findComment-590738 Share on other sites More sharing options...
chick3n Posted July 15, 2008 Author Share Posted July 15, 2008 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? Link to comment https://forums.phpfreaks.com/topic/114877-solved-curl-and-saving-sessions/#findComment-590756 Share on other sites More sharing options...
discomatt Posted July 15, 2008 Share Posted July 15, 2008 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. Link to comment https://forums.phpfreaks.com/topic/114877-solved-curl-and-saving-sessions/#findComment-590757 Share on other sites More sharing options...
chick3n Posted July 15, 2008 Author Share Posted July 15, 2008 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. Link to comment https://forums.phpfreaks.com/topic/114877-solved-curl-and-saving-sessions/#findComment-590795 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.