|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-12-17 20:59 UTC] spam2 at rhsoft dot net
[2018-12-17 21:19 UTC] requinix@php.net
-Type: Bug
+Type: Feature/Change Request
[2018-12-17 21:19 UTC] requinix@php.net
[2018-12-18 17:45 UTC] cyberbeat at gmx dot de
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 04:00:01 2025 UTC |
Description: ------------ I make a post request to an url, and get a redirect (to the https version of the page) as a response. In such case, the post data should be sent again to the https-url. But the post data seems not to be sent in the second request. With CURL (with follow-location-option) this case is handled as expected. Test script: --------------- <?php $postdata = http_build_query( array( 'var1' => 'some content', 'var2' => 'doh' ) ); $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata ) ); $context = stream_context_create($opts); $result = file_get_contents('http://example.com/submit.php', false, $context); ?>