note 59877 added to ref.curl

From: Date: Mon, 19 Dec 2005 03:10:44 +0000
Subject: note 59877 added to ref.curl
Groups: php.notes 
Request: Send a blank email to php-notes+get-100394@lists.php.net to get a copy of this message
I've seen a few people claim things like curl executing 2000 requests per minute (I didn't believe it, but see godaddy.com in the results below). I've also gotten into 5-6 arguments about the speed of cURL vs. other alternatives. To stop the argument once and for all, I've created a script that will test cURL retreiving a page 50 times and file_get_contents 50 times, on a variety of different URL's. For simplicity, I have only retreived the page from the remote site and then went on to the next request. All URL's are using the HTTP protocal; FTP is not tested. Here are the results of the script on one execution: Calculating 50 queries to http://www.flickr.com/. cURL took 9.550734 seconds. file_get_contents() took 10.878360 seconds. Calculating 50 queries to http://www.yahoo.com/. cURL took 4.729566 seconds. file_get_contents() took 10.443786 seconds. Calculating 50 queries to http://www.ebay.com/. cURL took 46.348250 seconds. file_get_contents() took 52.685604 seconds. Calculating 50 queries to http://www.godaddy.com/. cURL took 1.505460 seconds. file_get_contents() took 37.154304 seconds. Calculating 50 queries to http://www.php.net/. cURL took 13.136836 seconds. file_get_contents() took 17.981879 seconds. You may test this yourself while the script is up as well. Make a note that the page will take a few minutes to load completely (add all of the result times above and then some). http://monitor.trucex.com/curltest.php ---- Manual Page -- http://www.php.net/manual/en/ref.curl.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59877 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59877&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59877&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59877&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59877&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59877&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59877&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59877&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59877&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#100394) next »