Jump to content


Member Since 23 Apr 2006
Offline Last Active Oct 29 2015 10:53 PM

Posts I've Made

In Topic: About The New Forums

20 October 2012 - 10:27 AM

Hey guys, looks great. Well done to those that did the change over. Not very active anymore but it's great to see the community continue to grow.

In Topic: Migrating to IPB

26 August 2012 - 10:20 AM

Very interesting. Not that I frequent here anymore (I'm sorry!) I'll be interested to see how it all goes. I'll check in from time to time. After all.. this is probably my longest standing account on the internet.

Good luck to you!

In Topic: Timezone Syncing

14 April 2012 - 04:20 AM

I've come to the conclusion that Twitter most likely uses JavaScript to update their dates. You can check this by changing your computers date/time and refreshing the page.
As an educated guess I'd say Twitter keeps the timezone setting as a server-side fall back in case something goes wrong client-side. Fair enough. I've gone the same way.

I'm using PHPDate for jQuery to make formatting my dates easier and also using this conversion script found on StackOverflow.

This has turned into a client-side thing now. Ah well, hopefully this can help someone.

In Topic: NodeJS + socket.io + PHP to achieve real-time notifications

21 March 2012 - 10:09 AM

Just an update for people. I'm approaching this like I've posted above. I'll be making use of Node/Socket.io/Redis (pub/sub feature) to handle real-time updates for notifications and other related components.

Once I get it working properly I'll post how I did it all for future reference. :)

In Topic: NodeJS + socket.io + PHP to achieve real-time notifications

21 March 2012 - 06:26 AM

Thanks for your reply kicken! :)

What I'm getting at is this. Say I post a new update or something, when that update is inserting into the database should I push the notification through to socket.io which then broadcasts that notification to the connected clients? Does that sound feasible? What I want to try to avoid is polling the database every couple of seconds to check for new notifications. I'm using MySQL and I've read that other database's handle that sort of thing a tad better.


This is a quote from another forum:

To communicate between php and web sockets I suppose you will need some comet solution. We did it on this way:
1. Have Redis (pub/sub feature) to send/retrieve messages (channel No is user ID)
2. Have PHP to send notifications into Redis when something happen
3. Have Node.js app listen all channels and send notification to web sockets

How to identify user:
1. After user login we added to Redis hash pair: sessionID => userID
1. After user connected to socket, it send auth command to node.js with session ID.
2. Node.js check hash in Redis for sessionID and get userID.
3. Node.js subscribe connection to userID channel

I can make sense of that... I'll just need to implement Redis since I don't have it at the moment.