2010/5/14 ã6. cronç¨ã®ãã¡ã¤ã«ãä½æãããã®ãµã³ãã«ããã®ã¾ã¾ã³ãã¼ãã¦ãåããªãã£ããããªã®ã§ä¿®æ£ èªåãå®éã«BOTãåãã¾ã§è¡ã£ãæé ãã¾ã¨ãã¦ã¿ã¾ããã WindowsXP SP3ã§ä½æãã¦ãã¾ããä»ã®OSã§ã¯ä¸é¨éãæãããããããã¾ããã 2011å¹´10æç¾å¨ãã®ãã¼ã¸ã«æ¸ãããæ¹æ³ã§ã¯ä¸æãBOTãåããªãããã§ããä»ã®ãµã¤ããåèã«ãã¦ãã ããã BOTæ¬ä½ãä½ã ããã°ã©ãã³ã°ãã§ããªãã¦ãä½ããTwitter botã®ä½ãæ¹ ãã¡ãã®ãµã¤ããè¦ãã°ãå®æçã«æç« ãpostãããã@ä»ãã®ã¬ã¹ä¸ã®ç¹å®ã®åèªã«åå¿ããããã«å¿ããã¬ã¹ããããã¨ãã£ãã·ã³ãã«ãªBOTãªãCGIã®ç¥èãä¸åãªã人ã§ãä½ããã¨æãã¾ãã webããæç« ãæ¾ã£ã¦ãããªã©ç¹æ®ãªãã®ã¯èªåã§ã¹ã¯ãªãããæ¸ããªãã¨ç¡çã§ãã ããã®èª¬æãè¦ãªããBOTãä½ãPHPã使ãããµã¼ãã¼ï¼ç¡æ
cronã使ãã¨ãµã¼ãã¼ä¸ã«ããããã°ã©ã ãæå®ããæéã«å®æçã«èªåçã«å®è¡ã§ããã Windowsã§è¨ãã¨ã¿ã¹ã¯ã¹ã±ã¸ã¥ã¼ã©ã®ãããªãã®ã ç¨éã¨ãã¦ã¯ãã¦ã§ããµã¤ãã§ã®å®æçãªAPIã®å®è¡ãéè¨å¦çãããã¯ã¢ãããªã©ãããã å社ã®ã¬ã³ã¿ã«ãµã¼ãã¼ã§ãããã¦ãã³ã³ããã¼ã«ããã«ã«ã¦ç°¡åã«è¨å®ã§ããããã«ãªã£ã¦ããã åºæ¬ã³ãã³ã ã¿ã¼ããã«çã§æä½ããå ´åã¯ãcrontabã³ãã³ãã使ç¨ããã ç»é²æ¸ã¿ã®cronã®ä¸è¦§ã表示ããã crontab -l cronãç·¨éãããç·¨éæ¹æ³ã¯viã¨åãã crontab -e cronããã¹ã¦åé¤ããã crontab -r è¨è¿°ä¾ ã¿ã¼ããã«çã§ã³ãã³ããç´æ¥è¨è¿°ããå ´åã®ä¾ã cronã®æ¸å¼ã¯ä»¥ä¸ã®ããã«ãªã£ã¦ããã å(0-59) æ(1-24) æ¥(1-31) æ(1-12) ææ¥(0-7,0=7=æ¥ææ¥) ã³ãã³ã æ°åãæ¸ãã¨ãã®
ä»æ¥ã¯Twitterã®èªåæ稿APIï¼è¦ã¯bot)ã PHPï¼OAuthèªè¨¼ã§ä½æããæ¹æ³ãç´¹ä»ãã¾ãã OAuthèªè¨¼ã«ã¯Pearã®OAuthãæåã§ããã twitteroauth.phpãå©ç¨ããæ¹æ³ãç°¡åã§ãã â ã¾ããä¸è¨URLããtwitteroauth.phpã¨OAuth.phpã ãã¦ã³ãã¼ããã¦ãã ããã http://github.com/abraham/twitteroauth/tree/master/twitteroauth/ â¡TwitterAPIã«ç»é²ããå種KEYãåå¾ãã 2-1. http://dev.twitter.com/ã«ç»é² ã»ã¢ããªã±ã¼ã·ã§ã³å ãââããæ稿ãã§è¡¨ç¤ºãããååã«ãªãã¾ã ã»ã¢ããªã±ã¼ã·ã§ã³ã®èª¬æ 説æãæ¸ãã¦ãã ãã ã»ã¢ããªã±ã¼ã·ã§ã³ã®ã¦ã§ããµã¤ãã®URL ãªãã§ãããã§ããhttp://twitter.com/ã§ã大ä¸å¤«ã§ã
ãã®ã¨ã³ããªã§èª¬æãã¦ããæ¹æ³ã¯ BASIC èªè¨¼ã§ã®æ稿æ¹æ³ã§ãã BASIC èªè¨¼ã«ãã Twitter ã¸ã®æ¥ç¶ã¯2010å¹´8ææ«ãæã£ã¦å»æ¢ããã¾ããã ç¾å¨ã¯ OAuth ã使ç¨ããå¿ è¦ãããã¾ãã®ã§ãã注æãã ããã åèï¼PHPã§Twitter APIã®OAuthã使ãæ¹æ³ã¾ã¨ã â é ãä¸ PHP ã使ç¨ã㦠Twitter ã«æ稿ããæ¹æ³ã®ã¡ã¢ã ã¨è¨ã£ã¦ã以ä¸ã®ããã«ããã ãã $username = "twitter_user"; // Twitter ã®ã¢ã«ã¦ã³ã $password = "password"; // ãã¹ã¯ã¼ã $post = "ã»ãã»ã"; // æ稿ããå 容 $url = 'http://twitter.com/statuses/update.xml?'; $params = "status=". rawurlencode($post); $r
++TWITTERãªã¤ã¸ã®ã£ã°èªåæ稿ãããamezor_gagã  ä»åã¯ã ãåãã£ã¦æºåããã¡ãã»ã¼ã¸ãè¨è¼ããããã¹ããã¡ã¤ã«ï¼æ¹è¡åºåãã®ä¸è¡æï¼ãTWETTERã«ã©ã³ãã ã§èªåæ稿ã ããããã£ã¦ã¿ã¾ãã ã»UTF-8ã§ããã¹ããã¡ã¤ã«ãä½æ ã»PHPã³ã¼ããUTF-8㧠TWITTERã®ã¢ã«ã¦ã³ãããªã人ã¯ãåå¾ãã¦ä¸ããã ++https://twitter.com/ å®ã¯ä»åããã¾ãå 容ãç解åºæ¥ã¦ãã¾ããããã¡ãã¡ããæ¾ãéããæ å ±ãç¶ãæ¥ããã¾ããã ããäºã¯ãããã¹ããåãè¾¼ãã URLãä½æãã¦ãããPOSTãããã ãã§ãã ; <?php ; $url = "http://twitter.com/statuses/update.xml?"; ; $username = ã¦ã¼ã¶ãã¼ã ; ; $password = ãã¹ã¯ã¼ã; ; $fh=fopen("ããã¹ãå.
charactorbotã¯Twitterã®ãã£ã©ã¯ã¿ã¼ããããä½æããã®Google App Engineã®ã¢ããªã±ã¼ã·ã§ã³ã§ãããã¡ãã§twitterãããä½æãµã¼ãã¹ - ãã£ã©ãããã¨ããååã§éç¨ããã¦ãã¾ãã ãªã2013å¹´5æ7æ¥(ã¢ãã¦ã³ã¹ã¯å¤ããããããã¾ãã)ã®Twitter API1.0ã®å»æ¢ã«ã¨ããªã1.6.0ãããå¤ããã¼ã¸ã§ã³ã¯å©ç¨ã§ããªããªãã¾ãã èªåã§ãµã¼ãã¹ãä½æããç°¡æãããã¤ç¨ã®ããã±ã¼ã¸ããã¦ã³ãã¼ãã§ããã»ããSVNããã½ã¼ã¹ããã§ãã¯ã¢ã¦ããã¦ãããã¤ãããã¨ã§ãèªåã§ã¢ã¬ã³ã¸ãããµã¼ãã¹ãéç¨ãããã¨ãã§ãã¾ãã ã©ã¤ã»ã³ã¹ã¯GPLv3ã¨ãªã£ã¦ãããèªç±ã«ã½ã¼ã¹ã³ã¼ããç·¨éãããã¨ãã§ãã¾ãã(GPLv3ã®æ¥æ¬èªè¨³ : http://sourceforge.jp/magazine/07/09/02/130237 ) ã·ã¹ãã è¦ä»¶ 以ä¸ããç°¡æã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}