note 85956 added to function.curl-setopt

From: Date: Fri, 26 Sep 2008 07:37:23 +0000
Subject: note 85956 added to function.curl-setopt
Groups: php.notes 
Request: Send a blank email to php-notes+get-144728@lists.php.net to get a copy of this message
To fetch (or submit data to) multiple pages during one session,use this: <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefile"); curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiefile"); curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id()); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_URL, 'http://site.com/page1.php'); $result1 = curl_exec($ch); curl_setopt($ch, CURLOPT_URL, 'http://site.com/page2.php'); $result2 = curl_exec($ch); curl_close($ch); ?> ---- Server IP: 89.190.194.18 Probable Submitter: 85.187.93.147 ---- Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php Edit -- https://master.php.net/note/edit/85956 Del: integrated -- https://master.php.net/note/delete/85956/integrated Del: useless -- https://master.php.net/note/delete/85956/useless Del: bad code -- https://master.php.net/note/delete/85956/bad+code Del: spam -- https://master.php.net/note/delete/85956/spam Del: non-english -- https://master.php.net/note/delete/85956/non-english Del: in docs -- https://master.php.net/note/delete/85956/in+docs Del: other reasons-- https://master.php.net/note/delete/85956 Reject -- https://master.php.net/note/reject/85956 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144728) next »