Ok, at the moment, your PHP hosted on mtgstream.com is only able to connect to the database and pull the data in the query because it contains the lines of code I posted above. Somewhere in one of those other files mentioned in those lines, there will be some lines of code establishing a connection to that websites database in order to run the query:
Code:
SELECT user_name FROM prochatrooms_users WHERE online_time >='$expire_secs' ".$hide_admins."
what I'm saying is, you need to log into whatever sort of control panel or SSH access you have on mtgstream.com and allow your website
http://www.magiciansthegathering.com to access
http://mtgstream.com/'s database. (Perhaps your host could help with that?)
Once you have done that, you can re-write your php you posted above, miss out the lines of code I quoted and instead pull the data directly from mtgstream.com's.
If your not sure how to do that, you can learn how to do this here:
http://php.net/manual/en/function.mysql-connect.php
Once you have done that, you can use most of the rest of your existing code to arrive at having the number of users online in your chat in a vairable. For example your PHP you posted above uses the "$online_users" vairable to store the number of uses online in your chat.
You can't use the 'echo' command with vB, you instead need to refrence your $online_users vairable in your template, after you have added your finalised php to a plugin.