Adblock breaks this site

[Tut][PHP] MSN Status image

Discussion in 'Web Programming' started by Jazz00006, Sep 2, 2008.

  1. Jazz00006

    Jazz00006 Apprentice
    Visual Basic Programmers

    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0
    [Tut][PHP] MSN Status image

    I was having a slow lecture, so I wrote this in class.
    Forgive any spelling /grammar mistakes. I almost fell asleep.




     
  2. FartKnocker

    FartKnocker Forum Addict

    Joined:
    Sep 3, 2007
    Posts:
    285
    Referrals:
    0
    Sythe Gold:
    5
    [Tut][PHP] MSN Status image

    So that's the sig i keep seeing in your sig on cruels.net :p.
     
  3. cp

    cp an cat
    Banned

    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0
    [Tut][PHP] MSN Status image

    You should really do a cache or something (I assume you didn't because the tutorial does not cover it) since the page itself used for checking loads slowly.

    Is there no other way to check msn status other than using some weird site?
     
  4. Jazz00006

    Jazz00006 Apprentice
    Visual Basic Programmers

    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0
    [Tut][PHP] MSN Status image

    There's a way using fsockopen() to request from the server(s) directly. But it does use a bit more CPU time then most hosts allow, and some don't even allow fsock to be used at all.

    This way is able to be used by a larger majority of hosts.


    But what is the point of a cache is you want a live status? I understand that it would be quicker, but if you want too see some ones status in real time what is the point in seeing if they where online an hour or so ago?
     
  5. cp

    cp an cat
    Banned

    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0
    [Tut][PHP] MSN Status image

    Well, you could use maybe a smaller cache; say 5 minutes or something?

    And I don't see it necessary to re-draw the image every time, as that would use more cpu every time you refresh than making the query to get your status directly. Maybe you could check if previous settings are same, and if they are, load from a saved, pre-rendered image or something...
     
  6. Jazz00006

    Jazz00006 Apprentice
    Visual Basic Programmers

    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0
    [Tut][PHP] MSN Status image

    Okay, I'll modify the code to allow for a cache, then update the tutorial.

    Good tip ;) cheers.

    Update:

    I've re-written the code and uploaded it onto my server, but I'll write the new tutorial tomorrow.
     
  7. hampe-92

    hampe-92 Forum Addict

    Joined:
    Jul 10, 2008
    Posts:
    328
    Referrals:
    0
    Sythe Gold:
    0
    [Tut][PHP] MSN Status image

    what program do u use for this? i know absolutley nothing about php...
     
  8. AADude

    AADude Member

    Joined:
    Apr 3, 2008
    Posts:
    43
    Referrals:
    0
    Sythe Gold:
    0
    [Tut][PHP] MSN Status image

    You can install a program such as XAMPP or LAMPP to run the php code, OR you could upload it to a webserver with php installed (such as ULMB)
     
  9. Mr Monkey

    Mr Monkey Forum Addict

    Joined:
    Apr 11, 2006
    Posts:
    552
    Referrals:
    0
    Sythe Gold:
    0
    [Tut][PHP] MSN Status image

    Install XAMPP its quite easy to use.
    If you have questions on how to use it PM me.
     
  10. hampe-92

    hampe-92 Forum Addict

    Joined:
    Jul 10, 2008
    Posts:
    328
    Referrals:
    0
    Sythe Gold:
    0
    [Tut][PHP] MSN Status image

    ok thx guys... I will pm if I need help :)
     
< PHP vs ASP/Classic | Game on! >


 
 
Adblock breaks this site