本文整理汇总了PHP中header::game方法的典型用法代码示例。如果您正苦于以下问题:PHP header::game方法的具体用法?PHP header::game怎么用?PHP header::game使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类header
的用法示例。
在下文中一共展示了header::game方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: game
function game($path)
{
$game_data = $this->db->select('game_index.*,game_category.NAME as CATEGORY_NAME')->from('game_index')->join('game_category', 'game_index.ID_CATEGORY=game_category.ID', 'inner')->like('game_index.REFERER', $path)->get()->result_array();
if ($game_data) {
} else {
redirect('/game/');
}
$header = new header();
$header->game('Chơi game ' . $game_data[0]['NAME'], 'frm', 'search');
$content = file_get_contents($game_data[0]['REFERER']);
if (preg_match('/game.24h.com.vn/', $game_data[0]['REFERER'])) {
$content = str_replace('/upload/game/', 'http://game.24h.com.vn/upload/game/', $content);
preg_match_all('/<div class="choiGame-container">(.*?)<div class="centerBox-o-b-gamePage-gameplay">/s', $content, $matches, PREG_SET_ORDER);
foreach ($matches as $key) {
}
$content = $key[0];
$data['path'] = '';
}
if (preg_match('/www.trochoiviet.com/', $game_data[0]['REFERER'])) {
$data['path'] = $game_data[0]['EMBED_PATH'];
$content = '<div id="trochoiviet"></div>';
}
if (preg_match('/vi.y8.com/', $game_data[0]['REFERER'])) {
$data['path'] = '';
}
$data['game_name'] = trim($game_data[0]['NAME']);
$data['id_cate'] = $game_data[0]['ID_CATEGORY'];
$data['cate_name'] = $game_data[0]['CATEGORY_NAME'];
$data['game_category'] = $this->db->select('*')->from('game_category')->get()->result_array();
$data['game'] = $content;
$this->load->view('game/fetch_game', $data);
}