SHOUTcast doesn’t support SSL/HTTPs. The Shoutcast service on the port like 8000 is an unencrypted server for HTTP and ICY. So Shoutcast need proxy/restream HTTP stream to HTTPS.

 

You can use PHP or NodeJS or NGINX to restream Radio Streams.

 

Re-Stream PHP Proxy file – stream/index.php

<?php 

/*

Icecast / Shoutcast MP3 Radio Stream 

Shoutcast V1 (http://shoutcast-server-ip:port/) 
Shoutcast V2 (http://shoutcast-server-ip:port/streamname) 
Icecast V2 (http://icecast-server-ip:port/streamname)

Type: Audio
Codec: MPEG Audio layer 1/2 (mpga)
Channels: Stereo
Sample rate: 44100 Hz
Bitrate: 128 kb/s

*/

header('Content-Type: audio/mpeg');

$server = "[Server-IP-Address]";
$port = "[Port]";
$mount = "[Mount-Point]";

// HTTP Radio Stream URL with Mount Point
$url = "http://".$server.":".$port."/".$mount;

// Open Radio Stream URL
// Make Sure Radio Stream [Port] must be open / allow in this script hosting server firewall 
$f=fopen($url,'r');

// Read chunks maximum number of bytes to read
if(!$f) exit;
while(!feof($f))
{
	echo fread($f,128);  
	flush();
}
fclose($f);

?>

 

.htaccess – stream/.htaccess

<FilesMatch "mp3$">
    SetHandler application/x-httpd-php5


RewriteEngine On
#RewriteBase /

# Redirect MP3 to PHP
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).mp3$ index.php [L]

 

So if you host these files on HTTPS enabled server in folder “stream” …. Radio Stream Proxy URL will look like 

 

https://www.domain.com/stream/audio.mp3 

 

If you are Looking for a SHOUTcast server with free SSL and HTTPS enabled, you can go for our Low-cost Shoutcast Server packages. https://www.ucartz.com/shoutcast-dedicated-server-ucartz

 

If you want to get a low-cost SHOUTcast radio hosting that comes with free SSL/HTTP's, you can go for our SHOUTcast hosting. All our SHOUTcast and Icecast hosting packages come with SSL and unlimited auto DJ Space.

https://www.ucartz.com/ucartz-shoutcast-internet-radio

 

هل كانت المقالة مفيدة ؟ 5682 أعضاء وجدوا هذه المقالة مفيدة (5688 التصويتات)