09/12/16 10:44:25
こうじゃね?
あと改行削るべきだし、できたらファイル読み込みとかにエラーチェック入れたいが。
$filename = "plist.txt";
$filename2 = "log.txt";
$plist = @file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$log = @file($filename2, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$plist_uniq = array_diff($plist, array_slice($log, 0, 10)); //重複しない候補
$post = $plist_uniq[array_rand($plist_uniq)];