如何使用php fopen()与非标准端口?

I need my website to be able to use fopen() to access files on my file streaming server, which our admin has configured to use port 8000. But it errors out and I believe it's because of the port number. I have allow_url_fopen enabled in php.ini too, so I don't think that's the issue.

Warning: fopen(http://129.237.213.244:8000/mp3/First_8864.mp3) [function.fopen]: 
failed to open stream: Connection refused in _npp_get_mp3() (line 23 of 
/home2/ab83417/public_html/drupal/sites/all/modules/npr_player_pack/npp_library.php).

So my question is: Can I somehow tell the webserver or our stream server (icecast, btw) to stop being so picky, or should I use some other php function like curl?

You should make sure that you have allow_url_fopen set to 1.

Launch the following script:

<?php
error_reporting(E_ALL);
ini_set('display_errors','1');

echo ini_get('allow_url_fopen')."<br />";
$x = file_get_contents('http://129.237.213.244:8000/mp3/First_8864.mp3');

$y = fopen('http://129.237.213.244:8000/mp3/First_8864.mp3',"rb");

It gives me simple 1 and no warnings. If you also get 1 but have warnings you should run the script in other browser and change your ip earlier (for example vpn). It's possible that this site has banned your ip so you cannot connect with this site/url.