@curl_setopt($ch, CURLOPT_HEADER, true);
+ @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
+ @curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
+
if (!is_null($accept_content)){
curl_setopt($ch,CURLOPT_HTTPHEADER, array (
"Accept: " . $accept_content
function post_url($url,$params, $headers = null, &$redirects = 0, $timeout = 0) {
$a = get_app();
$ch = curl_init($url);
- if(($redirects > 8) || (! $ch))
+ if(($redirects > 8) || (! $ch))
return false;
curl_setopt($ch, CURLOPT_HEADER, true);
}
// replace the special char encoding
-
- $s = htmlspecialchars($s,ENT_QUOTES,'UTF-8');
+ $s = htmlspecialchars($s,ENT_NOQUOTES,'UTF-8');
return $s;
}