Closed joeyboli closed 2 years ago
Hey Guys, just found https://api.streamafrica.net/host/
it helps host your api.php file for free forever if you plan on using a free html static hosts like cloudflare pages or netify etc.
How To?
just copy the github raw file Url of the api.php and go to https://api.streamafrica.net/host/ paste it there and you get your free php file for hosting, comes with a URL and path/ No CORS problem, Add the full URL inside the script.js file in this Line https://github.com/gsavio/player-shoutcast-html5/blob/32c1f258211d1b6389728cf63c2932d6d527a491/js/script.js#L396
and replace it with https://api.streamafrica.net/host/upload/1541.php or the link you had when you uploaded the php file from github. Change the .log file name in the api.php file and make sure to make it unique if you plan on keeping history
WORKING EXAMPLE : https://streamafrica-net.pages.dev/lofi/lofi/
Example for the code line edit is :
xhttp.open('GET', 'https://api.streamafrica.net/host/upload/1541.php?url=' + URL_STREAMING + '&streamtype=' + STREAMING_TYPE + '&historic=' + HISTORIC + '&next=' + NEXT_SONG + '&t=' + d.getTime(), true); xhttp.send();}
Hey Guys, just found https://api.streamafrica.net/host/
it helps host your api.php file for free forever if you plan on using a free html static hosts like cloudflare pages or netify etc.
How To?
just copy the github raw file Url of the api.php and go to https://api.streamafrica.net/host/ paste it there and you get your free php file for hosting, comes with a URL and path/ No CORS problem, Add the full URL inside the script.js file in this Line https://github.com/gsavio/player-shoutcast-html5/blob/32c1f258211d1b6389728cf63c2932d6d527a491/js/script.js#L396
and replace it with https://api.streamafrica.net/host/upload/1541.php or the link you had when you uploaded the php file from github. Change the .log file name in the api.php file and make sure to make it unique if you plan on keeping history
WORKING EXAMPLE : https://streamafrica-net.pages.dev/lofi/lofi/
Example for the code line edit is :
xhttp.open('GET', 'https://api.streamafrica.net/host/upload/1541.php?url=' + URL_STREAMING + '&streamtype=' + STREAMING_TYPE + '&historic=' + HISTORIC + '&next=' + NEXT_SONG + '&t=' + d.getTime(), true); xhttp.send();}