Jump to content

[SOLVED] CURL creates new session?


drewbee

Recommended Posts

Hello everyone,

I currently have a curl session that can access hundreds of different pages on a site. One thing I noticed with it is that it is initiating a new session of the server that is accessing. I don't want it to create a million sessions, just use the one it currently has.

 

I am going to guess that if curl_close($ch) is called, then it is is reinitiated curl_init, it restarts the session correct?

 

Is their a way for it to maintain the same connection that I missed somewhere, or do I need to do some if/elses to check for an already open curl session??

 

Thank you for your insight.

 

Drew

Link to comment
Share on other sites

Do you happen to know how the search engines react to this kind of situation, whether they hold the same session while their browsing like crazy bots throughout the site, or if they are just initiating a new session on each grab?.

Link to comment
Share on other sites

Yeah, that is what I was guessing too. I know all the major boards usually have an entire section of code dedicated to identifying search engines and labeling them (or ignoring them). I guess i'll have to tell people to handle my bot accordingly when it comes to their site.

 

Thanks for the insight.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.