Click here to Skip to main content
13,139,773 members (72,007 online)
Click here to Skip to main content
Add your own
alternative version

Stats

43.6K views
264 downloads
7 bookmarked
Posted 2 Mar 2009

AIM Session Tracker Utility

, 2 Mar 2009
Rate this:
Please Sign up or sign in to vote.
Tracks the status of an AIM user (online, away, offline).

AIMTracker

ss_program.jpg

Introduction

This is my first CodeProject article. I've made a small AIM instant messenger session tracker utility. I took the image from here. If this is a copyright violation, please let me know.

This program polls the status of any AIM user by visiting a special link.

The Code

The essence of the program is only one line:

http://api.oscar.aol.com/presence/get?k=DEVELOPERKEY&f=xml&t=SCREENNAME1&t=SCREENNAME2...

This allows you to get the state of the AIM user - online, away, offline. Note that it is not possible to check if a user is invisible or not using this URL (although there is a way to check if a user was invisible or not after they come back online). Also, you need a developer key to use this service (you can get one here).

Since this URL returns an XML document, I processed it with XML tools from the C# library. Here's the general method I used to get each individual element; you can't copy and paste it into Visual Studio, but it should give you a general direction:

XmlDocument xDoc = new XmlDocument();
xDoc.Load("http://api.oscar.aol.com/presence/get?k=DEVELOPERKEY&f=xml&t=SCREENNAME");
XmlNodeList Users = xDoc.GetElementsByTagName("user");  
foreach (XmlNode User in Users)
{
       string Screenname = User["displayId"].InnerText;
}

Points of Interest

I've always noticed .NET programs take up a fair chunk of memory, so I Googled 30 minutes about how to reduce .NET program memory sizes. And, I found a useful link: http://bytes.com/groups/net-c/302104-forcefully-releasing-memory.

This is how to reduce program memory size:

public static void ReduceMemoryUsage()
{
    try
    {
        Process CurrentProcess = Process.GetCurrentProcess();
        CurrentProcess.MaxWorkingSet = CurrentProcess.MinWorkingSet;
    }
    catch { }
}

Conclusion

There's not much to the code. Download and use the program as it is. The developer key in the download above is my developer key, so I would appreciate it if each of you could get your own developer key.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

jasonpang2011
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

 
Generalplm Pin
pedoz10-Nov-09 12:16
memberpedoz10-Nov-09 12:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.170915.1 | Last Updated 2 Mar 2009
Article Copyright 2009 by jasonpang2011
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid