tags:

views:

73

answers:

1

Hello ,

Please forgive this question if its a bit dumb, but I am new to php and slightly lost.

I am trying to write a little twitter client, where the user's timeline updates come from the Twitter Streaming API (it is not complete but for the sake of design it will do).

The process would be:

User signs up-> I add him to the list of users to track in the Stream -> If I see a message for the user I publish it on his timeline. (The stream listening would happen on the server).

How do I go about doing something like this in php ? It seems a socket server is the way to go (http://www.functionblog.com/?p=67=1), but then people tend to say its a bit of hack....

Thanks a lot

A: 

hi jlezard, there is a php class that handels all this for you. see, http://code.google.com/p/phirehose/. Hope this helps.

Azeem Michael
@Azeem thanks! I was particularly wondering about how to push the updates (new stream items) to the client in php. For example lets say you follow a user on the stream, when you see an update on the stream you would like the users timeline to update and display the update.
jlezard
I haven't tried this functionality but if you look at /example directory of download there is a filter-reconfigure.php example. I believe your code would be similar but instead of $this->setTrack() you will be doing $this->setFollow($userIds). Returned status would be as follows: http://dev.twitter.com/doc/get/statuses/show/:id
Azeem Michael