Hate My Blog

Fuzzy status of who’s online at reddit

This is some quick and dirty little code to test without much precision if any particular user is online over at Reddit.


//get the url | json decode it to an array
//this just grabs the first element and then its timestamp

//this is a delay of 15 min. use std. timestamp math
if((time()-$t) < (60 * 15)){ //and they are online ;) } //or offline ;( [/sourcecode]


September 10, 2009 - Posted by | Code, PHP | , , , ,

1 Comment »

  1. This code is pig disgusting.

    * Whitespace,please.Peopledon’twritelikethis.
    * Using undefined constants as strings relies on non-standard behavior and should be throwing warnings.
    * It’s in PHP.

    Comment by Anonymous | September 10, 2009 | Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: