Setting Radio Station For VCMP Using PHP ( v-0.2 )

Started by !, Aug 20, 2018, 06:30 PM

Previous topic - Next topic

!

Since the topic has been started by some users so there it is a small guide which I think is a solution.

Snippet is taken from
https://stackoverflow.com/questions/14952157/streaming-mp3-file-through-php/24227722#24227722

What is happening inside php file? :edit:
The links to audio files are stored inside an array( songs ) by user manually and than each audio file in that variable is streamed, an infinite loop has been started in it so that the streaming never ends it repeats every time it reaches to the end of final song in the list.

Steps To Set It Up  :edit:
>> Copy the snippet (Recommended Snippet v-0.2) from bellow link in a php file lets suppose the file is named as audio_stream.php

>> Don't forget to edit this array in it
$songs = [
'song1 complete link along with http/https',
'song2 complete link along with http/https',
'song3 complete link along with http/https'
];
In my case it is
$songs = [
'http://asian-city.tk/songs/Waqqaberry.mp3',
'http://asian-city.tk/songs/Fly_Project__Get_Wet.mp3'
];

>> Time to upload this audio_stream.php file to any host in which php is available after uploading the streaming link will be as follow
http://my_domain.com/audio_stream.php
In my case it is
http://asian-city.tk/audio_stream.php

>>Time to use the link of php file in vcmp
CreateRadioStream( Any_ID, "Custom Radio", "http://my_domain.com/audio_stream.php", true );
Snippets(Recommended Snippet v-0.2)  :edit:
v-0.2 >> https://pastebin.com/78EuuZCf
v-0.1 >> https://pastebin.com/ksgQxtiK


Live Version
/* Link To streaming file */
/* http://asian-city.tk/vcmp_stream.php */
/* Create radio statement */
CreateRadioStream( 20, "AC Radio", "http://asian-city.tk/vcmp_stream.php", true );


Note
Better to upload the audio files to the same host where streaming file is upload rather using random links of audio files from other mp3 sites.

Discord: zeus#5155

!

Released V-0.2

Reason of releasing this version?
In previous version the php function globe has been used to get the audio files from a specific directory inside the same host so I have replaced it with an array variable which allow user to use random links of songs weather the audio file is in same host or any other host simply put the link of audio file in this array detailed steps has been posted in first topic of how to configure this array.

First post has been modified check the first post for complete information and configuration.




Quote from: MEGAMIND on Aug 21, 2018, 02:57 PMcurrently not working for me as ik know much regarding this stuff, and i have experience in this stuff, i have made a tutorial on how to do it properly+ an old snippet i share soon once ill get back after some work
You better need to try the live version of this topic

Quote from: ! on Aug 20, 2018, 06:30 PMLive Version
/* Link To streaming file */
/* http://asian-city.tk/vcmp_stream.php */
/* Create radio statement */
CreateRadioStream( 20, "AC Radio", "http://asian-city.tk/vcmp_stream.php", true );

Discord: zeus#5155