本文整理汇总了PHP中Reference::parse方法的典型用法代码示例。如果您正苦于以下问题:PHP Reference::parse方法的具体用法?PHP Reference::parse怎么用?PHP Reference::parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reference
的用法示例。
在下文中一共展示了Reference::parse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gmdate
$dirhelper->deleteOldIPs($fstat_cache_dir . "ip", $fstat_new_user);
//get the user from cache, on success it is a old user is_new is false then
$user->getFromCache(__DIR__ . "/" . $fstat_cache_dir . "ip");
if ($user->is_new) {
//Daten auswerten
$current_folder = __DIR__ . "/" . $fstat_data_dir . "stat/" . gmdate("Y", $user->time) . "/" . gmdate("m", $user->time);
if ($dirhelper->checkExists($fstat_data_dir . "stat") == false || $dirhelper->checkExists($fstat_data_dir . "stat/" . gmdate("Y", $user->time)) == false || $dirhelper->checkExists($current_folder, true) == false) {
//quit the execution here
return 0;
}
//User Agent Parser
$parser = new UAS\Parser(__DIR__ . "/" . $fstat_cache_dir, $fstat_update_interval, false, $fstat_update_auto);
$uaa = $parser->Parse($user->agent);
//ReferParser
$ref = new Reference(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "");
$ref->parse();
//Country Parser
$country = new Country(__DIR__ . "/dbip-country-1.csv", __DIR__ . "/dbip-country-2.csv", __DIR__ . "/dbip-country-3.csv", __DIR__ . "/dbip-country-4.csv", __DIR__ . "/dbip-country-5.csv");
$country->parse($user->ip);
//Browser Typ ist bis jetzt nicht deklariert
$user->type = $uaa['typ'];
//Daten in XML schreiben:
$tmp_filename = $current_folder . "/" . gmdate("d", $user->time) . ".xml";
if (file_exists($tmp_filename)) {
$xmldoc = new DOMDocument();
$xmldoc->preserveWhiteSpace = false;
$xmldoc->formatOutput = true;
$xmldoc->load($tmp_filename);
$root = $xmldoc->documentElement;
} else {
$xmldoc = new DOMDocument('1.0', 'UTF-8');