PR5 - App Server 0.1

Should you wish to write you own script to submit the necessary data from your own media player, you can use this server to submit the data to my system. The following documentation should contain all of the necessary information.

Handshaking

Before submitting any information about the tracks you are listening to, you should begin by handshaking with the server. For this you will require your username and an MD5 hash of the password you entered. This information should be put into the following URL.

http://project.wblinks.com/app_server_0_1/handshake.pr5?username=&auth=

Putting the username and the MD5 hash in the appropriate places. The server will then response with either "OK" (in plaintext) followed by a session ID on a new line if everything went fine, or "BAD" followed by a reason on a new line, if something went wrong.

Once you've got an "OK" response from the server, you can begin to submit track information.

Submitting Information

You should follow the URL given below when a new track begins to play in your media player.

http://project.wblinks.com/app_server_0_1/submit.pr5?sid=&artist=&track=&album=

Again, replacing the necessary information with the data from your media player. You should also make sure sid is the id returned from the handshake.

As before, you will get an "OK" response if everything went well. If you get a "BAD" response, the reason will be on a new line. This will usually be either that you haven't sucessfully performed a handshake, or some information is missing.

Skipping a Track

I also need information on when a track was skipped. If a track is stopped, or a new track begins to play before the current track is over, you should follow the URL below. DO NOT follow this if the user is just pausing a track.

http://project.wblinks.com/app_server_0_1/skip.pr5?sid=&artist=&track=&album=&time=

Where time is the amount of time the track had been playing for when it was skipped.

NB : This was tricky to implement with my test client and iTunes because iTunes doesn't distinguish between pausing and stopping. If the player you're using this with does the same, then drop me an email and I'll send over the logic I used with iTunes.

Thanks!

This should be all the information you need. If you have any questions, or are getting errors and don't know why, then please send me an email. If you've gotten to this point, then you should already know my email address.

If you could also send me any programs/scripts you make for your media players, I'll be able to upload them for other people to use too. (With full credit of course).

Thanks for testing!