<?
header('Content-Type: text/html;charset=UTF-8');
?>
<html>
<head>
<heta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>

<?
$dbUser = '1234';
$dbPassword = '1234';
$hostName = 'localhost';
$portNum = '591';
$dirPath = 'FMPro';

mb_language( 'ja' );
mb_internal_encoding('EUC-JP');
mb_http_input('EUC-JP');

$url= "http://$dbUser:$dbPassword@$hostName:$portNum/$dirPath";
$param .= '-findall=';
$param .= '&-db=webtest.fp5';
$param .= '&-format=-fmp_xml';

echo "POSTのパラメータ：<br>$param<hr>";
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $param);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch); 
curl_close ($ch); 
echo $result;

?>
</body>
</html>