[Solved] Post data & show source code
[ad_1] You can use 3rd parameter of this function: context $postdata = http_build_query( array( ‘var1’ => ‘some content’, ‘var2’ => ‘doh’ ) ); $opts = array( ‘http’ => array( ‘method’ => “POST”, ‘header’ => “Connection: close\r\n”. “Content-Length: “.strlen($postdata).”\r\n”, ‘content’ => $postdata ) ); $context = stream_context_create($opts); $result = file_get_contents(‘http://example.com/submit.php’, false, $context); // edit -little bug … Read more