Community discussions

 
Kazek
just joined
Topic Author
Posts: 24
Joined: Mon Feb 12, 2018 12:53 pm

DNS forwarding

Fri Dec 07, 2018 3:52 pm

Hi guys!

I'm setting up an IPTV app at location with core being Mikrotik CCR.
The app by default pulls the channel playlist from address:
http://iptv.local/playlist.m3u
So to make it work I set up static DNS rule in CCR like this:
/ip dns static
add address=xxx.yyy.xx.qqq name=iptv.local
and uploaded the "playlist.m3u" to the root directory of xxx.yyy.xx.qqq. This works great as expected.

The problem is I'm doing next location that will need a different playlist.
I can't make any changes in the app with a link or file name.
I also can't make subdirectories since in DNS I can only put an IP address.

Is there any way to solve it without creating separate servers for each playlist?
 
mkx
Forum Guru
Forum Guru
Posts: 2925
Joined: Thu Mar 03, 2016 10:23 pm

Re: DNS forwarding

Fri Dec 07, 2018 5:38 pm

You could have a script (i.e. PHP) instead of static playlist on the server (to which you're directing clients via DNS setting). It would serve different playlists depending on client IP address or some other criteria. Any decent web server will allow you to execute script even if the file extension is "not right".
BR,
Metod

Who is online

Users browsing this forum: No registered users and 36 guests