note 19500 added to function.curl-setopt

From: Date: Fri, 01 Mar 2002 00:18:02 +0000
Subject: note 19500 added to function.curl-setopt
Groups: php.notes 
Request: Send a blank email to php-notes+get-27211@lists.php.net to get a copy of this message
It's possible to take advantage of multiple URLs on the same host in one curl_exec transaction ... just use multiple instances of CURLOPT_URL. Example: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://foo.com/a.html"); curl_setopt($ch, CURLOPT_URL, "http://foo.com/b.html"); curl_setopt($ch, CURLOPT_URL, "http://foo.com/c.html"); curl_exec($ch); curl_close($ch); ... the URLs appear to be hit in the same order they are entered. This takes advantage of cURL's Persistant Connection capability if all the URLs are on the same host! -- http://www.php.net/manual/en/function.curl-setopt.php http://master.php.net/manage/user-notes.php?action=edit+19500 http://master.php.net/manage/user-notes.php?action=delete+19500 http://master.php.net/manage/user-notes.php?action=reject+19500

« previous php.notes (#27211) next »