本文整理匯總了PHP中Info::subdomains方法的典型用法代碼示例。如果您正苦於以下問題:PHP Info::subdomains方法的具體用法?PHP Info::subdomains怎麽用?PHP Info::subdomains使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Info
的用法示例。
在下文中一共展示了Info::subdomains方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: action_query
public function action_query($domain)
{
$domain = strtolower($domain);
Log::write('check', 'traffic: ' . $domain);
//validate format and chars
if (!preg_match('/^(?:[-A-Za-z0-9]+\\.)+[A-Za-z]{2,6}$/', $domain)) {
return View::make('info.index')->with('title', 'Traffic Information')->with('type', 'traffic')->with('valid', 0);
}
$awis = new Info($domain);
if ($awis->valid() == 0) {
return View::make('error.awis_down')->with('title', 'Traffic Information Error')->with('type', 'traffic');
}
$awis->set_to_cache();
$contact_info = $awis->contact_info();
$content_data = $awis->content_data();
$subdomains = $awis->subdomains();
$traffic_3m = $awis->traffic_data('3m');
$traffic_1m = $awis->traffic_data('1m');
$traffic_7d = $awis->traffic_data('7d');
$traffic_1d = $awis->traffic_data('1d');
return View::make('info.query', array('title' => $domain . '\'s traffic info', 'contact_info' => $contact_info, 'content_data' => $content_data, 'subdomains' => $subdomains, 'traffic_3m' => $traffic_3m, 'traffic_1m' => $traffic_1m, 'traffic_7d' => $traffic_7d, 'traffic_1d' => $traffic_1d, 'domain' => $domain, 'type' => 'traffic'));
}