5
* @author geoffreyfishing
7
* The following will be filled automatically by SubVersion!
8
* Do not change by hand!
11
* $LastChangedRevision: $
15
function do_post_request($url, $data, $optional_headers = null)
17
$params = array('http' => array(
21
if ($optional_headers !== null) {
22
$params['http']['header'] = $optional_headers;
24
$ctx = stream_context_create($params);
26
$fp = fopen($url, 'rb', false, $ctx);
28
throw new Exception("Problem with $url; ".ob_get_clean());
30
$response = @stream_get_contents($fp);
31
if ($response === false) {
32
throw new Exception("Problem reading data from $url; ".ob_get_clean());
b'\\ No newline at end of file'