Index: trunk/core/kernel/globals.php =================================================================== diff -u -N -r3543 -r3863 --- trunk/core/kernel/globals.php (.../globals.php) (revision 3543) +++ trunk/core/kernel/globals.php (.../globals.php) (revision 3863) @@ -304,7 +304,7 @@ * @param unknown_type $post * @return unknown */ - function curl_post($url, $post) + function curl_post($url, $post, $headers=null) { if( is_array($post) ) { @@ -314,13 +314,19 @@ } $ch = curl_init($url); + + if (!is_null($headers)) { + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + } + curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,CURLOPT_REFERER, PROTOCOL.SERVER_NAME); curl_setopt($ch,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']); curl_setopt($ch,CURLOPT_FOLLOWLOCATION, 0); + curl_setopt($ch, CURLOPT_TIMEOUT, 90); $ret = curl_exec($ch); curl_close($ch); @@ -394,7 +400,7 @@ { return round(($pounds + ($ounces / 16)) * POUND_TO_KG, 5); } - + /** * Formats file/memory size in nice way * @@ -423,7 +429,7 @@ $return .= ' '.$suffix; return $return; } - + /** * Enter description here... *