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. Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment 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. 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.