Created
August 30, 2014 01:08
-
-
Save ustreamer-01647/a8b8dcc6595486a2ccb9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www26.atwiki.jp/easybotter_wiki/pages/28.html#id_9cd5da71 EasyBotter 非公式wiki - ver.2.0/応用/機能追加/postRandom
すでに解決されていた.おわり