/* ----------------------------------------------------------------------------- get subject.txt and check target thread's information. (most top = return 1)
in: [string] bbs [integer] dat ID out: [mixed] (int) rank / (bool) false ----------------------------------------------------------------------------- */ function threadChk($b, $k){ // get subject.txt $subject = @file("https://ex14.vip2ch.com/{$b}/subject.txt"); if($subject === false) return false;
/* ----------------------------------------------------------------------------- get target thread's dat and count current res qty. (>>1 only = return 1)
in: [string] bbs [integer] dat ID out: [mixed] (int) res qty / (bool) false ----------------------------------------------------------------------------- */ function currentResCount($b, $k){ // get DAT file $sk = (string) $k; $dat = @file("https://ex14.vip2ch.com/{$b}/dat/{$sk}.dat"); if($dat === false) return false;
/* ----------------------------------------------------------------------------- get subject.txt, search welcome thread and write that's dat id to local file in: [string] file path ----------------------------------------------------------------------------- */ function welcomeThreadKeyResearch($keyPath){ // get subject.txt $subject = file("https://ex14.vip2ch.com/news4ssnip/subject.txt"); if($subject === false) exit('thread key research failed.');