L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 07, 2008, 10:42:18 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > 0.4.x Custom/Unofficial Modules > Topic: BeBot all a Twitter
Pages: [1]   Go Down
« previous next »
Print
Author Topic: BeBot all a Twitter  (Read 481 times)
0 Members and 1 Guest are viewing this topic.
Glarawyn
BeBot Developer
Champion
********
Offline Offline

Posts: 391



BeBot all a Twitter
« on: April 10, 2008, 02:14:08 PM »

And org member tossed out the suggestion of getting raid alerts on his phone via SMS. I couldn't think of a way to do it, too many different SMS gateways and what not.

A few months later it struck me while I was playing with Twitter...PHP should be able to post messages to Twitter, and Twitter can send alerts via SMS...

So I created this module. You can configure a Twitter username and password and then post to that Twitter account from in game using the tweet command.

You can also view the latest 20 tweets from the bot's account or other Twitter accounts using the twitter command.

Commands
tweet <message>: Add <message> to Twitter.com.
twitter: Display the last 20 tweets for the configured Twitter.com account.
twitter <username>: Display the last 20 tweets for <username>.

Requirements
The TwitterPHP class requires PHP5, thus this module requires PHP5.

To post to Twitter, you have to configure a twitter username/password via BeBot's settings interface.

Examples
AO Sentinels on Twitter.com.
Campalot on Twitter.com.

Download
BeBotTwitter_2.0.0.zip
« Last Edit: April 21, 2008, 10:43:09 PM by Glarawyn » Logged
Snarfblatt
Rookie
**
Offline Offline

Posts: 49


Re: BeBot all a Twitter
« Reply #1 on: April 15, 2008, 10:37:05 AM »

I was going to try this out but it appears that curl is not in the BeBot distribution of php or at least my version which is 5.1.4. Do you know if curl is enabled in the 5.2.3 version? or any tips on how to enable curl in windows?
Logged
Glarawyn
BeBot Developer
Champion
********
Offline Offline

Posts: 391



Re: BeBot all a Twitter
« Reply #2 on: April 15, 2008, 07:58:00 PM »

Grab the full PHP distribution from http://www.php.net/downloads.php, use the zip file version. Replace the BeBot PHP with this PHP distribution...

This site has Windows binaries for cURL, I don't know if you need them.
http://curl.haxx.se/download.html

From there, search google for php5, windows, and curl and you'll find a bunch of info.
Logged
Glarawyn
BeBot Developer
Champion
********
Offline Offline

Posts: 391



Re: BeBot all a Twitter
« Reply #3 on: April 15, 2008, 08:08:57 PM »

Download finished, PHP5 zip file from php.net definitly has the lib_curl.dll extension.
Logged
Snarfblatt
Rookie
**
Offline Offline

Posts: 49


Re: BeBot all a Twitter
« Reply #4 on: April 16, 2008, 10:02:04 AM »

Thanks started going down the full php path yesterday. I'll test things out after the servers come back up.
Logged
Snarfblatt
Rookie
**
Offline Offline

Posts: 49


Re: BeBot all a Twitter
« Reply #5 on: April 16, 2008, 10:28:45 AM »

Success! In case anyone else tries it out, you just need to install the full php distro like Glara mentioned and then change the "php_extension" setting in the php.ini file in the BeBot directory and add the php_curl.dll to the "extensions" list.
Logged
Glarawyn
BeBot Developer
Champion
********
Offline Offline

Posts: 391



Re: BeBot all a Twitter
« Reply #6 on: April 16, 2008, 05:31:53 PM »

Campalot is running a slightly different version of the module that provides a function similar to send_output() so that raid alerts are automatically posted on Twitter. People seem to like it.
Logged
Glarawyn
BeBot Developer
Champion
********
Offline Offline

Posts: 391



Re: BeBot all a Twitter
« Reply #7 on: April 21, 2008, 10:47:07 PM »

Futzed with it a bit.

  • Moved the twitterPHP.php file from Sources/ to custom/
  • Created a core module.

Using TwitterCore functions in your modules:
Send an update to Twitter.com:
$this -> bot -> twitter -> send_update($message);

Retrieve a user's timeline:
$this -> bot -> twitter -> user_timeline($username);

Happy twittering.
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > 0.4.x Custom/Unofficial Modules > Topic: BeBot all a Twitter
« previous next »
 
Jump to:  

Recent
Help with online info in ...
by Barlyman
[Today at 07:56:24 PM]

BeBot v0.5.3 released (de...
by Temar
[Today at 07:51:18 PM]

Security
by Alreadythere
[September 06, 2008, 10:02:42 AM]

Probs with relay from gue...
by Temar
[September 06, 2008, 09:03:06 AM]

Raid spam in guild chat
by Temar
[September 06, 2008, 09:01:18 AM]

Org Relaying
by Nytridr
[September 06, 2008, 01:34:35 AM]

Link 2 Guilds via 2 Bots?
by Temar
[September 05, 2008, 04:22:40 PM]

SVN download
by clashbot
[September 05, 2008, 05:12:59 AM]

TWC
by Temar
[September 05, 2008, 12:27:23 AM]

How to find the guild ID?...
by Irinir
[September 03, 2008, 02:58:54 PM]
Stats
Members
Total Members: 965
Latest: morisey
Stats
Total Posts: 10414
Total Topics: 1413
Online Today: 18
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 5
Guests: 22
Total: 27
egrath
paranoiak
Zeephonz
Barlyman
Temar

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.359 seconds with 28 queries. (Pretty URLs adds 0.058s, 4q)
Loading...