note 100556 added to function.curl-getinfo

From: Date: Fri, 22 Oct 2010 23:56:49 +0000
Subject: note 100556 added to function.curl-getinfo
Groups: php.notes 
Request: Send a blank email to php-notes+get-173390@lists.php.net to get a copy of this message
CURLINFO_HTTP_CODE does not return a string, as the docs say, but rather an integer. <?php $c = curl_init('http://www.example.com/'); if(curl_getinfo($c, CURLINFO_HTTP_CODE) === '200') echo "CURLINFO_HTTP_CODE returns a string."; if(curl_getinfo($c, CURLINFO_HTTP_CODE) === 200) echo "CURLINFO_HTTP_CODE returns an integer."; curl_close($c); ?> returns "CURLINFO_HTTP_CODE returns an integer." ---- Server IP: 69.147.83.197 Probable Submitter: 12.233.200.164 ---- Manual Page -- http://www.php.net/manual/en/function.curl-getinfo.php Edit -- https://master.php.net/note/edit/100556 Del: integrated -- https://master.php.net/note/delete/100556/integrated Del: useless -- https://master.php.net/note/delete/100556/useless Del: bad code -- https://master.php.net/note/delete/100556/bad+code Del: spam -- https://master.php.net/note/delete/100556/spam Del: non-english -- https://master.php.net/note/delete/100556/non-english Del: in docs -- https://master.php.net/note/delete/100556/in+docs Del: other reasons-- https://master.php.net/note/delete/100556 Reject -- https://master.php.net/note/reject/100556 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#173390) next »