Reputation: 488
I bought an IPTV reseller account and I got the links like that:
#EXTM3U
#EXTINF:-1,CHANNEL NAME 1
http://X.X.X.X:15000/live/USERNAME/PASSWORD/13094.ts
#EXTINF:-1,CHANNEL NAME 2
http://X.X.X.X:15000/live/USERNAME/PASSWORD/13095.ts
etc...
Now, I want to be an IPTV provider, so the m3u playlist file which I provide should be like that:
#EXTM3U
#EXTINF:-1,CHANNEL NAME 1
http://example.com/viewchannel.php?username=User&password=test&channelid=13094
#EXTINF:-1,CHANNEL NAME 2
http://example.com/viewchannel.php?username=User&password=test&channelid=13095
etc...
What should I write in the viewchannel.php file to live stream a TS file?
So http://example.com/viewchannel.php?username=User&password=test&channelid=13095 must redirect to http://X.X.X.X:15000/live/USERNAME/PASSWORD/13095.ts and it should be playable on the players...
I tried to use http://codesamplez.com/programming/php-html5-video-streaming-tutorial like that:
<?php
include("streamclass.php");
$filePath = "http://X.X.X.X:15000/live/USERNAME/PASSWORD/13094.ts";
$stream = new VideoStream($filePath);
$stream->start();
?>
but it doesn't work for streaming from URLs (or maybe it doesn't work for live streaming).
Upvotes: 3
Views: 7268
Reputation: 15
The best option would be getting a VPS hosting from a reliable hosting provider, and signup as a restream partner with your IPTV streams provider.
Upvotes: 1