Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $m3uData = file_get_contents("http://site.com/list.m3u"); //удаленный m3u
- $localData = file_get_contents("local.txt"); //локальный файл
- $regex = "([A-Z\d\.-]{2,})\.([A-Z]{2,})(:\d{2,4})?/i";
- $matches = array();
- $localMatches =
- if(preg_match($regex,$m3uData,$matches) && preg_match($regex,$m3uData,$localMatches) ){
- $localData = str_replace($localMatches[0],$matches[0],$localData);
- file_put_contents($localData,"local.txt");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement