<?

class EpiDBClient {

	var $server = 'https://egg.science.uva.nl:7443';
	var $path_submit = '/submit/';

	function __construct() {
	}

	function __epidb_encode($data) {
		$res = array();
		foreach ($data as $key=>$val) {
			$res[] = $key . '=' . urlencode($val);
		}
		return implode('&', $res);
	}

	function __epidb_call($url, $data) {
		$param = $this->__epidb_encode($data);

		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $url);
		curl_setopt($ch, CURLOPT_POST, count($data));
		curl_setopt($ch, CURLOPT_POSTFIELDS, $param);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		$res = curl_exec($ch);
		curl_close($ch);

		return $res;
	}

	function submit($data, $source, $format='json') {
		$param = array();
		$param['data'] = $data;
		$param['source'] = $source;
		$param['format'] = $format;
		$url = $this->server . $this->path_submit;
		$res = $this->__epidb_call($url, $param);
	}



};


<?

class EpiDBClient {

	private $server = 'https://egg.science.uva.nl:7443';
	private $path_submit = '/submit/';

	public function __construct() {
	}

	private function __epidb_encode($data) {
		$res = array();
		foreach ($data as $key=>$val) {
			$res[] = $key . '=' . urlencode($val);
		}
		return implode('&', $res);
	}

	private function __epidb_call($url, $data) {
		$param = $this->__epidb_encode($data);

		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $url);
		curl_setopt($ch, CURLOPT_POST, count($data));
		curl_setopt($ch, CURLOPT_POSTFIELDS, $param);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		$res = curl_exec($ch);
		curl_close($ch);

		return $res;
	}

	public function submit($data, $source, $format='json') {
		$param = array();
		$param['data'] = $data;
		$param['source'] = $source;
		$param['format'] = $format;
		$url = $this->server . $this->path_submit;
		$res = $this->__epidb_call($url, $param);
	}



};


--- 
+++ 
@@ -2,13 +2,13 @@
 
 class EpiDBClient {
 
-	private $server = 'https://egg.science.uva.nl:7443';
-	private $path_submit = '/submit/';
+	var $server = 'https://egg.science.uva.nl:7443';
+	var $path_submit = '/submit/';
 
-	public function __construct() {
+	function __construct() {
 	}
 
-	private function __epidb_encode($data) {
+	function __epidb_encode($data) {
 		$res = array();
 		foreach ($data as $key=>$val) {
 			$res[] = $key . '=' . urlencode($val);
@@ -16,7 +16,7 @@
 		return implode('&', $res);
 	}
 
-	private function __epidb_call($url, $data) {
+	function __epidb_call($url, $data) {
 		$param = $this->__epidb_encode($data);
 
 		$ch = curl_init();
@@ -32,7 +32,7 @@
 		return $res;
 	}
 
-	public function submit($data, $source, $format='json') {
+	function submit($data, $source, $format='json') {
 		$param = array();
 		$param['data'] = $data;
 		$param['source'] = $source;
Remove 'private' and 'public' keywords to make the script works
with PHP4.
