Esempio n. 1
0
        $this->starttime = $this->getmicrotime();
    }
    function end()
    {
        $this->stoptime = $this->getmicrotime();
        $this->spendtime = $this->stoptime - $this->starttime;
        //return round($this->spendtime,10);
    }
    function display()
    {
        //$this->end();
        echo "<p>Runtime: " . round($this->spendtime, 10) . " s</p>";
    }
}
$timer = new Runtime();
$timer->start();
$DOCUMENT_ROOT = "./";
echo $DOCUMENT_ROOT . "<br />";
//结构化数据导出,按需要修改
$xmlRootXiangQing = $DOCUMENT_ROOT . "results/";
//详情生成地址
$xmlRootChannel = $DOCUMENT_ROOT . "results/channel/";
//频道生成地址
$xmlRootQuXian = $DOCUMENT_ROOT . "results/quxian/";
//区县生成地址
$xmlRootXiaoQu = $DOCUMENT_ROOT . "results/xiaoqu/";
//小区省城地址
$xmlRootShangQuan = $DOCUMENT_ROOT . "results/shangquan/";
//商圈生成地址
$xmlRootPartChannelAndQuXian = $DOCUMENT_ROOT . "results/";
//部分城市区县地址
Esempio n. 2
0
<?php

/**
 * Created by: Hiko
 * Date: 14-10-13
 * Time: 上午10:06
 */
require_once 'Runtime.php';
require_once 'IpService.php';
$findIp = '61.135.169.74';
// 测试的ip
$runtime = new Runtime();
$runtime->start();
$info = IpService::getIpInfo($findIp);
$runtime->end();
var_dump($info);
echo '查询IP: ' . $findIp . ' 耗时 <span style="color: green;">' . $runtime->spent() . '</span> 毫秒';