The link is for series in Turkish and I'm trying to stream it in kodi, but they recently changed the streams to secure token and to IP address of person streaming.
Sample link::

The rest of the streams that I get is with Python cronjob and it works.. And also puts in the folder like how I want it to..

#EXTINF:-1 ,Poyraz Karayel 2. Bolum
#EXTINF:-1 ,Poyraz Karayel 3. Bolum
#EXTINF:-1 ,Poyraz Karayel 3. Bolum

If I can get some thing like this to work great..

Other way I'm imlemanting is , I have done before

header("Content-Type: audio/x-mpegurl");
header("Content-Disposition: inline; filename=\"playlist.m3u\"");
$url = "https://www.kanald.com.tr/gunesin-kizlari/bolumler/gunesin-kizlari-son-bolum";
$content = file_get_contents($url);
preg_match_all('<meta itemprop="contentURL" content="(.*?)" />', $content, $matches);
echo "#EXTM3U\n#EXTINF:317,Gunesin Kizlari\n";

This script php is working when we click the link but it gives private link to ip ..
If we can do it another way great.. Any ideas to skip or have in assigned ip