note 83839 added to function.httprequest-setheaders

From: Date: Sat, 14 Jun 2008 06:29:08 +0000
Subject: note 83839 added to function.httprequest-setheaders
Groups: php.notes 
Request: Send a blank email to php-notes+get-140430@lists.php.net to get a copy of this message
note: you should not put a colon in the keys of the arrays you pass this method, it will do that for you. and if you do put colons in the array keys, the resultant headers will have 2 colons beside one another. so for example, <?php $httpRequest->setHeaders('User-Agent' => 'Mozilla/1.22 (compatible; MSIE 5.01; PalmOS 3.0) EudoraWeb 2'); ?> will result in User-Agent: Mozilla/1.22 (compatible; MSIE 5.01; PalmOS 3.0) EudoraWeb 2 <?php $httpRequest->setHeaders('User-Agent:' => 'Mozilla/1.22 (compatible; MSIE 5.01; PalmOS 3.0) EudoraWeb 2'); ?> will result in User-Agent:: Mozilla/1.22 (compatible; MSIE 5.01; PalmOS 3.0) EudoraWeb 2 ---- Server IP: 69.147.83.197 Probable Submitter: 63.225.118.136 ---- Manual Page -- http://www.php.net/manual/en/function.httprequest-setheaders.php Edit -- https://master.php.net/note/edit/83839 Del: integrated -- https://master.php.net/note/delete/83839/integrated Del: useless -- https://master.php.net/note/delete/83839/useless Del: bad code -- https://master.php.net/note/delete/83839/bad+code Del: spam -- https://master.php.net/note/delete/83839/spam Del: non-english -- https://master.php.net/note/delete/83839/non-english Del: in docs -- https://master.php.net/note/delete/83839/in+docs Del: other reasons-- https://master.php.net/note/delete/83839 Reject -- https://master.php.net/note/reject/83839 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140430) next »