本文整理匯總了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');