<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
//不会有超过30s的限制
set_time_limit(0);
if (isset($_POST['action'])) {
    $ss = new SoapClient(null, array('uri' => 'http://zendstudio.Net', 'location' => 'http://xijiaxiangwexin.sinaapp.com/test/Service.php'));
    //$header = new SoapHeader( 'zendHeader', 'mmcYY', '12345678' );
    //$ss->__setSoapHeaders( $header );
    echo $ss->im8('calculating');
    echo "</br>";
    echo "wait a moment, this need some time to calculate." . "</br></br>";
    $rate = $_POST['rate'];
    $times = $_POST['times'];
    $count = 0;
    for ($i = 0; $i < $times; $i++) {
        $count += $ss->rrt($rate);
    }
    echo "calculated.the average F-Measure of RRT in rate=" . $rate . " is:";
    echo "<span class='mystyle' style='color:red'>" . $count / $times . "</span>";
    echo "</br></br>";
    echo '<a href="' . $_SERVER['PHP_SELF'] . '">try again? click it</a>';
} else {
    ?>
<form action="ServiceClient.php" method="post">
RRT WebService(0-1数值范围demo)</br>
输入次数:<input type="text" name="times"/></br>
输入rate:<input type="text" name="rate"/></br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="hidden" name="action" value="submitted"/></br>
<input type="submit" name="submit"/></br>
</form>