PHP post without curl

You can simulate the post method using php without the help of curl library. download full source code: See the code below: function do_post_request($url, $data, $optional_headers = null) { $params = array(‘http’ =>; array(‘method’ =>; ‘POST’, ‘content’ =>; $data )); if ($optional_headers !== null) { $params['http']['header'] = $optional_headers; } $ctx = stream_context_create($params); $fp = @fopen($url, [...]

9 Comments , , , ,