Before the big server move I was on Lotus. The following code was working fine. After the move, my account was lost and I had to re-signup for a hosting account which is fine. Now my new account is on cossacks and my code no longer works. it does'nt pull the content from the external web site.
 
I checked to make sure that allow_url_fopen is on and it seems to be.
 
Any idea???
 
	
	
	
		
 
Thank you
			
			I checked to make sure that allow_url_fopen is on and it seems to be.
Any idea???
		Code:
	
	function do_post_request($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) {
  throw new Exception("Problem with $url, $php_errormsg");
 }
 $response = @stream_get_contents($fp);
 if ($response === false) {
  throw new Exception("Problem reading data from $url, $php_errormsg");
 }
 return $response;
}Thank you
 
				