Beispiel #1
0
 /**
  * 必死チェッカー対応板を読み込む
  * 自動で読み込まれるので通常は実行する必要はない
  */
 function load()
 {
     global $_conf;
     // include_once P2_LIB_DIR . '/p2util.class.php';
     $url = 'http://hissi.org/menu.html';
     $path = P2Util::cacheFileForDL($url);
     // メニューのキャッシュ時間の10倍キャッシュ
     P2UtilWiki::cacheDownload($url, $path, $_conf['menu_dl_interval'] * 36000);
     $file = @file_get_contents($path);
     preg_match_all('{<a href=http://hissi\\.org/read\\.php/(\\w+?)/>.+?</a><br>}', $file, $boards);
     $this->boards = $boards[1];
 }
Beispiel #2
0
 /**
  * 必死チェッカー対応板を読み込む
  * 自動で読み込まれるので通常は実行する必要はない
  */
 public function load()
 {
     global $_conf;
     $path = P2Util::cacheFileForDL($this->menuUrl);
     // メニューのキャッシュ時間の10倍キャッシュ
     P2UtilWiki::cacheDownload($this->menuUrl, $path, $_conf['menu_dl_interval'] * 36000);
     $this->boards = array();
     $file = @file_get_contents($path);
     if ($file) {
         if (preg_match_all($this->readPattern, $file, $boards)) {
             $this->boards = $boards[1];
         }
     }
 }
Beispiel #3
0
 /**
  * みみずん対応板を読み込む
  */
 public function load($type)
 {
     global $_conf;
     // 対応板の取得
     switch ($type) {
         case 0:
             $url = 'http://mimizun.com/search/2chlive.html';
             $path = $_conf['cache_dir'] . '/search.mimizun.com/2chlive.html';
             $match = '{<input type="checkbox" name="idxname" value="_(.+?)">}';
             break;
         case 1:
             $url = 'http://mimizun.com/search/2ch.html';
             $path = $_conf['cache_dir'] . '/search.mimizun.com/2ch.html';
             $match = '{<input type="checkbox" name="idxname" value="(.+?)">}';
             break;
     }
     // キャッシュ用ディレクトリが無ければ作成
     FileCtl::mkdir_for($path);
     // メニューのキャッシュ時間の10倍キャッシュ
     P2UtilWiki::cacheDownload($url, $path, $_conf['menu_dl_interval'] * 36000);
     $file = @file_get_contents($path);
     preg_match_all($match, $file, $boards);
     return $boards[1];
 }