Edit report at http://bugs.php.net/bug.php?id=54938&edit=1
ID: 54938 User updated by: simast at gmail dot com Reported by: simast at gmail dot com Summary: HTTP context with POST method should return response body -Status: Feedback +Status: Open Type: Bug Package: Streams related Operating System: Linux/Ubuntu PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: My bad - content is only returned on 200 OK response code. So this bug is related to http://bugs.php.net/bug.php?id=54898. And once that is sorted - this should work too. Previous Comments: ------------------------------------------------------------------------ [2011-05-27 12:06:40] johan...@php.net Are you sure your server response with some content? This works fine: <?php $opts = array( 'http'=>array( 'method'=>'POST' ) ); $context = stream_context_create($opts); $fp = fopen('http://php.net', 'r', false, $context); echo stream_get_contents($fp); ?> ------------------------------------------------------------------------ [2011-05-27 11:23:08] simast at gmail dot com Description: ------------ Apparently, having a POST method HTTP context request does not return response body back. Tested with stream_get_contents() but I suspect it does affect other similar functions as well (file_get_contents/fread). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54938&edit=1