Beispiel #1
0
 function dulich($path)
 {
     $path = str_replace('--', '/', $path);
     $data_tourism = $this->db->select('*')->from('tourism')->like('link', $path)->get()->result_array();
     $header = new header();
     $header->blog($data_tourism[0]['name']);
     $content = file_get_contents($data_tourism[0]['link']);
     if ($content) {
         //do nothing
     } else {
         redirect('/tour-du-lich-blog');
     }
     $content = str_replace('<script', '<script async', $content);
     $content = str_replace('dulich.vnexpress.net', 'myweb.pro.vn/blog/dulich', $content);
     $content = str_replace('tuc/', 'tuc--', $content);
     $content = str_replace('dong/', 'dong--', $content);
     $content = str_replace('van/', 'van--', $content);
     $content = str_replace('photo/', 'photo--', $content);
     $content = str_replace('video/', 'video--', $content);
     $data['content'] = $content;
     $this->load->view('tourism/fetch_tourism_data', $data);
 }