Skip to content

Instantly share code, notes, and snippets.

@ustreamer-01647
Created August 30, 2014 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ustreamer-01647/a8b8dcc6595486a2ccb9 to your computer and use it in GitHub Desktop.
Save ustreamer-01647/a8b8dcc6595486a2ccb9 to your computer and use it in GitHub Desktop.
/*
Original Information
http://pha22.net/twitterbot/ EasyBotter - プログラミングができなくても作れるTwitter botの作り方
EasyBotterバージョン2.1.3
This product includes PHP, freely available from http://www.php.net/
*/
//発言を作る
function makeTweet($file, $number = FALSE){
//txtファイルの中身を配列に格納
if(empty($this->_tweetData[$file])){
$this->_tweetData[$file] = $this->readDataFile($file);
}
//発言をランダムに一つ選ぶ場合
if($number === FALSE){
$status = $this->_tweetData[$file][array_rand($this->_tweetData[$file])];
}else{
//番号で指定された発言を選ぶ場合
$status = $this->_tweetData[$file][$number];
}
return $status;
}
@ustreamer-01647
Copy link
Author

http://www26.atwiki.jp/easybotter_wiki/pages/28.html#id_9cd5da71 EasyBotter 非公式wiki - ver.2.0/応用/機能追加/postRandom
すでに解決されていた.おわり

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment