$content);
		
		// echo "posting to: $url
";
		$c = curl_init();
		curl_setopt($c, CURLOPT_URL, $url); 
		curl_setopt($c, CURLOPT_USERPWD, "$username:$password");
		curl_setopt($c, CURLOPT_POSTFIELDS, $data); 
		curl_setopt($c, CURLOPT_RETURNTRANSFER, true); 
		curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
		$c_result = curl_exec($c); 
		if(curl_errno($c)){ 
			$error = curl_error($c);
			showForm($error, $content);
		}
		
		curl_close($c);
		if (!isset($error)) {
			echo '';
		}
		
	} else {
		$error = "Missing account name and/or password...try again please";
		showForm($error, $content);
	}
	
} else {
	showForm(null, $content);
}
function showForm($error, $content) {
	$username_cookie = $_COOKIE['username'];
	$password_cookie = $_COOKIE['password'];
	
	echo <<
		 Friendica Bookmarklet
		Friendica Bookmarklet
	
	
EOF;
	
}
?>