help with php error
#1

function _utils_post($url, $params)
{
$contextParams = array();
$contextParams['http'] = array();
$contextParams['http']['method'] = 'POST';
$contextParams['http']['content'] = http_build_query($params);
$context = stream_context_create($contextParams);
$fp = fopen($url, 'rb', false, $context); //244 error
$response = stream_get_contents($fp); //245 error
fclose($fp); // 246 error

return $response;
}

errors are red


Warning: fopen(http://www.cleverbot.com/webservicemin) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/server/public_html/server/chatterbotapi.php on line 254

Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /home/server/public_html/server/chatterbotapi.php on line 255

Warning: fclose() expects parameter 1 to be resource, boolean given in /home/server/public_html/server/chatterbotapi.php on line 256
Cleverbot:

how to fix this please?
Reply
#2

?
Reply
#3

Quote:

HTTP request failed! HTTP/1.1 403 Forbidden in /home/server/public_html/server/chatterbotapi.php on line 254

Means that you have no permissions to access the page webservicemin.
Reply
#4

ok but what to do ? ask my host to fix it ? or i can do it myself somehow ?
Reply
#5

if you can access the server that hosts your files then yes, otherwise contact the company support team to get more informations about it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)