Minase Posted January 7, 2010 Share Posted January 7, 2010 hello today i saw that my scripts are running slow i was debuging them and the performance leak was in curl it was getting the site content too slow is there a way to increase performance? what is the best method (fast get) for getting webpages with curl? thank you Link to comment https://forums.phpfreaks.com/topic/187626-curl-question/ Share on other sites More sharing options...
abazoskib Posted January 7, 2010 Share Posted January 7, 2010 if you dont need the body of the response, a good setting to set to true is CURLOPT_NOBODY, however i think since you are downloading webpages that might not be useful. try it, but other than that i think it has to do with your server's internet connection, and that of the sites you are downloading from. without much more detail from you thats all i can think of. Link to comment https://forums.phpfreaks.com/topic/187626-curl-question/#findComment-990602 Share on other sites More sharing options...
deviantPsyche Posted January 7, 2010 Share Posted January 7, 2010 The best way to increase the performance of your script if you're using curl is to use multicurl. I found a very useful class which I was able to implement into my scripts at http://www.phpclasses.org/browse/package/4091.html the only thing you can do with it is to load multiple pages though. If you need to do something else like load, pregmatch, and then load again then you will have to modify this class yourself. I haven't figured out how to do that myself yet... Link to comment https://forums.phpfreaks.com/topic/187626-curl-question/#findComment-990614 Share on other sites More sharing options...
Minase Posted January 7, 2010 Author Share Posted January 7, 2010 thank you very much i will look into it never thought of it i will let this topic open a little more to see what i can do with multi curl Link to comment https://forums.phpfreaks.com/topic/187626-curl-question/#findComment-990631 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.