I believe the problem is indicated by the “@file_get_contents(…” part of the code.
DreamHost does not have “fopen wrappers” enbaled for security reasons, and they are required for that code to work. This could explain (and most likely does explain) why they script works on some hosts but not on others. If a host has those fopen wrappers enabled, then it should work while if a host does not have those wrappers enabled, it will definitely will not.
My first suggestion is to contact the author of your script (you didn’t provide any linking information, so I can’t investigate the script further), and inquire as to whether they can provide a version that does not require those fopen wrappers (uses cURL?).
Alternately, if you are a proficient PHP coder, you can rewrite the script to use cURL for use on DreamHost.
You can also compile your own PHP and enable allow_url_fopen in that installation, or use and copy of DH’s PHP with a custom php.ini and enable all_url_fopen in that way (instructions for doing each of these things exist in the DreamHost wiki).
That said, the fact that you can do this does mean that you should. DreamHost has disabled those function fro good reason, and modifying your PHP environment to reverse that is not supported and you will be “on your own” if you bork it up. Additionally, doing this could introduce a significant security risk into your server’s environment; I recommend you do not do this.