note 111708 added to function.file-get-contents

From: Date: Tue, 19 Mar 2013 21:08:08 +0000
Subject: note 111708 added to function.file-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-194124@lists.php.net to get a copy of this message
If you are using file_get_contents() function to retrieve HTTP url and printing HTTP content, you can also send original content-type header using $http_response_header and header() function; <?php foreach ($http_response_header as $value) { if (preg_match('/^Content-Type:/i', $value)) { // Successful match header($value,false); } } ?> ---- Server IP: 69.147.83.199 Probable Submitter: 78.166.153.82 ---- Manual Page -- http://php.net/manual/en/function.file-get-contents.php Edit -- https://master.php.net/note/edit/111708 Del: integrated -- https://master.php.net/note/delete/111708/integrated Del: useless -- https://master.php.net/note/delete/111708/useless Del: bad code -- https://master.php.net/note/delete/111708/bad+code Del: spam -- https://master.php.net/note/delete/111708/spam Del: non-english -- https://master.php.net/note/delete/111708/non-english Del: in docs -- https://master.php.net/note/delete/111708/in+docs Del: other reasons-- https://master.php.net/note/delete/111708 Reject -- https://master.php.net/note/reject/111708 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194124) next »