Jump to content

Myspace Online NOW script


Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

People can hide their online status on MySpace though. There is an option to remain invisible, even when online.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...