I am trying to open a remote file and read the contents using the following code:

PHP Code:
$file 'http://www.domainname.com:82/file.xml';
if (
$data file_get_contents($file)) {
} else {
'could not read file';

This is working on my local wamp machine but when I try on the server i can't read the file. I have another file that is on port 80 so the url is like this "http://www.domainname.com/anotherfile.xml" and this one works. How do i get round this port issue?