<?
if(0){
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7" />
<?
}


function i7u8($str){ return iconv("ISO-8859-7","UTF-8",$str); }
function u8i7($str){ return iconv("UTF-8","ISO-8859-7",$str); }
function mailme($data,$subject=""){ mail("alex@hyperhosting.gr","Debuging data: ".$subject,$data); }
function mailme2($data,$subject=""){ mail("philip@hyperhosting.gr","Debuging data: ".$subject,u8i7($data)); }

 
  function postdata($data){
 
 	$fields_string = http_build_query($data);
//	mailme($fields_string,"return postdata");
  
  
  
  
	$ch = curl_init();    
	curl_setopt($ch, CURLOPT_URL, WHMCS_PROXY); 
	curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded; charset=UTF-8") );
	curl_setopt($ch, CURLOPT_HEADER, 0);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
	curl_setopt($ch, CURLOPT_TIMEOUT, 120); 
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS,$fields_string); 
	$return = curl_exec($ch); 

//  print_r ($return);
//	mailme($return,"return postdata");
	
	
	return $return; 
  
}






?>