If you HAVEN'T the fopen() enabled and you don't enable this function for security reasons, you need change the fopen() function in /classes/xmwclient.class.php.
You need to replace this:
for this:
to change the function.
I tested on my xBilling and this worked to me
You need to replace this:
Code:
function PostRequest($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, 'rb', false, $ctx);
if (!$fp) {
die("Problem reading data from " . $url . "");
}
$response = @stream_get_contents($fp);
//var_dump($response);
if ($response == false) {
die("Problem reading data from " . $url . "");
}
return $response;
}
Code:
function PostRequest($url, $data, $optional_headers = null) {
//Customizations for fopen() or curl()
if (ini_get('allow_url_fopen') == true) {
$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, 'rb', false, $ctx);
if (!$fp) {
die("Problem reading data from " . $url . "");
}
$response = @stream_get_contents($fp);
//var_dump($response);
if ($response == false) {
die("Problem reading data from " . $url . "");
}
return $response;
}
else if (function_exists('curl_init')) {
if ($optional_headers !== null) {
$params = array('httpheader:'. $optional_headers);
}
else {
$params = $optional_headers;
}
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
@curl_setopt($curl, CURLOPT_HTTPHEADER, $params);
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
else {
die("Problem reading data from " . $url . "");
}
}
I tested on my xBilling and this worked to me