note 80864 added to function.curl-getinfo

From: Date: Mon, 04 Feb 2008 23:02:10 +0000
Subject: note 80864 added to function.curl-getinfo
Groups: php.notes 
Request: Send a blank email to php-notes+get-135775@lists.php.net to get a copy of this message
Keep in mind that for CURLOPT_RETURNTRANSFER it has to be set with curl_setopt() before execution: This doesn't work: <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.example.com/"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_exec($ch); var_dump(curl_getinfo($ch,CURLINFO_HEADER_OUT)); ?> This works: <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.example.com/"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLINFO_HEADER_OUT, true); curl_exec($ch); var_dump(curl_getinfo($ch,CURLINFO_HEADER_OUT)); ?> ---- Server IP: 213.249.64.162 Probable Submitter: 212.67.187.214 ---- Manual Page -- http://www.php.net/manual/en/function.curl-getinfo.php Edit -- https://master.php.net/note/edit/80864 Del: integrated -- https://master.php.net/note/delete/80864/integrated Del: useless -- https://master.php.net/note/delete/80864/useless Del: bad code -- https://master.php.net/note/delete/80864/bad+code Del: spam -- https://master.php.net/note/delete/80864/spam Del: non-english -- https://master.php.net/note/delete/80864/non-english Del: in docs -- https://master.php.net/note/delete/80864/in+docs Del: other reasons-- https://master.php.net/note/delete/80864 Reject -- https://master.php.net/note/reject/80864 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#135775) next »