Recently i’ve been playing around with coherence. It’s pretty much an UPnP server that streams crap to your playstation3 or xbox 360. Problem is that even though the DivX/XviD format is supported in the newer firmwares, those files were displayed as ‘Unsupported Format’ in the PS3’s GameOS when being streamed over a default Coherence install. So, to remedy this i’ve taken the effort to research what caused the problem. You can do a diff if you want of these files, but everything is working fine for me (except for a lone MP3 file), but whatever.
Patched Coherence
Enjoy.
I’ve rethought the image retrieval technique, and the new revamped system is now 100% working. If you have already added the bot and it is showing offline, please just delete it and readd it. Over the last couple of days there have been a lot of struggles, mainly with getting the GD image stuff working, and the change between the “ADD” and the “ADC” command in MSN Protocol 11 from MSN Protocol 9. Instead of encrypting the username, I am storing a username in the database that is unrelated to your msn messenger address. To use the bot, just follow this simple technique.
Add blobsy@brentp.net
Once the bot comes online, open a conversation with it and type “!setusername ” remember, the username cannot contain spaces, &’s, and the other normal items that dont show up properly in a http request. Once you do that it’ll spit out your URL’s. The system supports two image themes. There is the Windows Live Messenger 8 Style, and the MSN7 Style.
Heres an example (live):
WLM:

MSN 7 Theme:

If you cannot get it working, please contact me at brent.pickup[nospam]@gmail.com (msn and email).
Remove all the stuff between the []’s.
Regards,
Brent
Ok, now that you’ve got Apache2 and PHP5 running, we need to make the actual code. So, here is the first part:
try {
$iTunes = new COM('iTunes.Application');
} catch (Exception $comexc) {
// do nothing, caught exception.
}
That pretty much connects us to iTunes, and catches an exception if it doesnt work, for example if COM Calls are disabled in iTunes (some people do it for security measures). Whenever we want to reference iTunes, we work with the $iTunes variable.
$Plylst = $iTunes->CurrentPlaylist;
if (!isset($_GET["act"])) {
$currentTrack = $iTunes->CurrentTrack;
$trackName = $currentTrack->Name;
$trackNumber = $currentTrack->TrackNumber;
$albumName = $currentTrack->Album;
$artistName = $currentTrack->Artist;
$playlist = $iTunes->LibraryPlaylist->Tracks;
// code for the play song from location thing.
$location = array();
$name = array();
$num = $playlist->Count;
echo "Number of Tracks in Library: ", $num;
for ($i = 0; $i < $num; $i++) {
//while ($i < $num) {
$track = $playlist[$i + 1];
$trackadd = $iTunes->LibraryPlaylist->Tracks[$i + 1];
array_push($name, “$track->Name”);
array_push($location, “$trackadd->Location”);
}
That pretty much assigns variables to the current track, the time in the track, the time remaining, and the artist and so on. After that finishes, we create two different arrays, one that stores the location to the MP3, and another one that stores the name of the mp3 itself. This is so that you can create a select box with the names and locations of the mp3s, so you can allow people to control your itunes over the internet. More specifically, the $iTunes->Playfile method doesnt take an mp3 name (Blahblah.mp3), you require a full path name (C:\Documents and Settings\….\My Music\Blahblah.mp3). That is pretty much some of the stuff you need to create a PHP App that controls iTunes. There are many possibilities for an application like this, as I made a msgrp2p.xml that lets you control my iTunes through a MSN Messenger activity (with the new Messenger Activities API). Neat eh? Part three will feature the raw code to the msgrp2p.xml and the iTunes controller. Theyre both pretty messy but they do the job.
Enjoy.
I love Microsoft Word for one reason, because you can make macros in Visual Basic 6 (wish they would use VB.NET). I discovered a really cool use of the macros at school the other week. Without further ado:
Sub test()
If (Application.Assistant.Visible = True) Then
Application.Assistant.Animation = msoAnimationEmptyTrash
Else
Application.Assistant.Visible = True
Application.Assistant.Animation = msoAnimationEmptyTrash
End If
End Sub
Select your office assistant as that robot dude (F1) and then run that macro, it makes him explode over and over and over again!
Enjoy.
Most people I know use iTunes as their music player. As with anything, there is a lot more you can do with Visual Studio + a COM SDK. Apple has made one for the iTunes music player, and I have been using it for quite a long time. It is available Here. You are able to connect to iTunes with Perl, JScript, C++, C#, VB.NET and probably some more. One language that you can connect to iTunes with is PHP, and there is very little documentation doing this. So, before you start, you need PHP5 (as it has fully rewritten COM internals) and Apache2, if you try with PHP4/Apache1.3.34 you will probably just get a PHP crash and a few ugly errors. You can get apache Here, and PHP5 from Here.
Stay tuned for Part Two.