Deathdefyer2002 Posted April 23, 2009 Share Posted April 23, 2009 Hey All, Just wondering if there was a script out there or if someone could give me some pointers on creating a script that would log when a user is online and when they aren't. I tried looking through the myspace.com source code and nothing really jumped out at me. does anyone have any suggestions? My first idea was to use Wget to download the HTML file and then scan through it to see if anything changed when someone was online to when they weren't. Defyer! Quote Link to comment Share on other sites More sharing options...
ratmandall Posted April 25, 2009 Share Posted April 25, 2009 My first idea was to use Wget to download the HTML file and then scan through it to see if anything changed when someone was online to when they weren't. If you look closely this text appears when a user is online <span class="msOnlineNow "> >Retrieve html of a users profile >Test whether the text <span class="msOnlineNow "> appears in the HTML >If True the user must be online. >If False the user must be offline. Quote Link to comment Share on other sites More sharing options...
digip Posted April 25, 2009 Share Posted April 25, 2009 People can hide their online status on MySpace though. There is an option to remain invisible, even when online. Quote Link to comment Share on other sites More sharing options...
Fblade1987 Posted April 26, 2009 Share Posted April 26, 2009 well please bear in mind all I am a weakling when it comes to shell scripting but this so do it for you ^^ #! /bin/bash userId=19035607 view=Online wget 'http://friends.myspace.com/index.cfm?fuseaction=user.viewfriends&friendID='$userId'&view='$view -q -O test.html egrep -o 'class="msProfileTextLink"[[:space:]]*title="([^"])*"' test.html > temp grep -o '"[^"]*"$' temp just put your userid where user id is and what type of friends list you want to check out on the view then just run :D Quote Link to comment Share on other sites More sharing options...
Deveant Posted April 26, 2009 Share Posted April 26, 2009 haha, unless you want to rape your internet usage, the algorithm is kinda useless, You want to log the users activity by downloading the HTML page, to do this you will constantly be downloading the page to get accurate logs. though to Fblade1987, good code :) Quote Link to comment Share on other sites More sharing options...
digip Posted April 26, 2009 Share Posted April 26, 2009 If they are on your friends list, all you have to do is query your profile. http://friends.myspace.com/index.cfm?fuseaction=user.viewfriends&view=online&friendID=xxxxxxx where "xxxxxxx" is YOUR profile id. This to me is the easiest way, so long as your friends do not have invisible turned on in their privacy settings. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.