本文整理汇总了PHP中header::story方法的典型用法代码示例。如果您正苦于以下问题:PHP header::story方法的具体用法?PHP header::story怎么用?PHP header::story使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类header
的用法示例。
在下文中一共展示了header::story方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view
function view()
{
if (isset($_REQUEST['fetchUrl'])) {
$result = $this->db->select('*')->from('system_story')->like('path', $_REQUEST['fetchUrl'])->get()->result_array();
$content = file_get_contents($result[0]['path']);
preg_match_all('/<div class="float_left">(.*?)<fb:comments/s', $content, $matches, PREG_SET_ORDER);
foreach ($matches as $key) {
}
$header = new header();
$header->story($result[0]['name']);
$data['content'] = $key[0];
$data['thumb'] = $result[0]['thumb'];
}
if (isset($_REQUEST['fetchItem'])) {
$result = $this->db->select('*')->from('system_story')->like('path', $_REQUEST['fetchItem'])->get()->result_array();
if ($result) {
$content = file_get_contents($result[0]['path']);
$header = new header();
$header->story($result[0]['name']);
//start www.doctruyen360.com
if ($result[0]['referer'] == 'wwwdoctruyen360com') {
//reset
$obj_view = '<div class="adv_micro_bottom"><script type="text/javascript" src="//e-vcdn.anthill.vn/delivery-ants/zone/517324894.js"></script></div><div class="relate_cus">';
$content = str_replace('<div class="relate_cus">', $obj_view, $content);
$content = str_replace('href="http://www.doctruyen360.com', 'href="/doc-truyen?fetchItem=', $content);
//end
preg_match_all('/<div id="main">(.*?)<div id="sidebar">/s', $content, $matches, PREG_SET_ORDER);
if ($matches) {
foreach ($matches as $key) {
}
$data['content'] = $key[0];
} else {
redirect('http://www.myweb.pro.vn/game/');
}
}
//end www.doctruyen360.com
//start truyendich.com
if ($result[0]['referer'] == 'truyendichcom') {
redirect('http://www.myweb.pro.vn/game/');
}
//end truyendich.com
//start truyen.vui1.net
if ($result[0]['referer'] == 'truyenvui1net') {
//reset
$content = str_replace('</h1>', '</h1><base href=http://truyen.vui1.net>', $content);
$obj_view = '<div class="adv_micro_bottom"><script type="text/javascript" src="//e-vcdn.anthill.vn/delivery-ants/zone/517324894.js"></script></div><div class="relate_cus">';
$content = str_replace('<div class="relate_cus">', $obj_view, $content);
$content = str_replace('href="http://truyen.vui1.net', 'href="http://myweb.pro.vn/doc-truyen?fetchItem=', $content);
$content = str_replace('data-natural-', '', $content);
$content = str_replace('src="/img/content/', 'src="http://truyen.vui1.net/img/content/', $content);
//end
preg_match_all('/<div class="panel-body">(.*?)<div class="panel-footer">/s', $content, $matches, PREG_SET_ORDER);
if ($matches) {
foreach ($matches as $key) {
}
echo '<base href="http://truyen.vui1.net/">';
$data['content'] = $key[0];
} else {
redirect('/doctruyen/danhmuc?id=2');
}
}
//end truyen.vui1.net
//start webtruyen.com
if ($result[0]['referer'] == 'webtruyencom') {
//reset
$obj_view = '<div class="adv_micro_bottom"><script type="text/javascript" src="//e-vcdn.anthill.vn/delivery-ants/zone/517324894.js"></script></div><div id="divlistbook">';
$content = str_replace('<div id="divlistbook">', $obj_view, $content);
$content = str_replace('href="http://webtruyen.com', 'href="http://myweb.pro.vn/doc-truyen?fetchItem=', $content);
//end
preg_match_all('/<div class="span8">(.*?)<div class="span4">/s', $content, $matches, PREG_SET_ORDER);
foreach ($matches as $key) {
}
//render view
$data['content'] = $key[0];
}
//end webtruyen.com
//render view
$data['name'] = $result[0]['name'];
$data['thumb'] = $result[0]['thumb'];
} else {
$content = file_get_contents('http://www.doctruyen360.com/' . $_REQUEST['fetchItem']);
//start doctruyen360.com
//reset
$obj_view = '<div class="adv_micro_bottom"><script type="text/javascript" src="//e-vcdn.anthill.vn/delivery-ants/zone/517324894.js"></script></div><div class="relate_cus">';
$content = str_replace('<div class="relate_cus">', $obj_view, $content);
$content = str_replace('href="http://www.doctruyen360.com', 'href="/doc-truyen?fetchItem=', $content);
//end
//render view
$header = new header();
$header->story('Đọc truyện Online');
preg_match_all('/<div id="main">(.*?)<div id="sidebar">/s', $content, $matches, PREG_SET_ORDER);
if ($matches) {
foreach ($matches as $key) {
}
$data['content'] = $key[0];
}
//end doctruyen360.com
if (preg_match('/Error 404 - Nothing Found/', $content)) {
$content = file_get_contents('http://truyen.vui1.net/' . $_REQUEST['fetchItem']);
if (preg_match('/Whoops, looks like something went wrong/', $content)) {
//.........这里部分代码省略.........