logic is this
if starts with http
if get.php in url then assume xtream code and call player_api.php
if player_api.php fails assume an ordinary external file. Will check a response from this url contains a playlist in the format of m3u8 file.
then checks local folder for any files ending in m3u or m3u8
So probably isn't going to pickup any 3rd party php file json responses.