Welcome to My iptv forum

  • Everyone is invited! My iptv forum is for everyone, new and advanced user alike!
  • Searching is key! Before you post a question, use the forum search feature to determine whether your topic has already been covered.
  • Do not start flame wars! If someone has engaged in behavior that is detrimental to the discussion -- spamming, harassment, etc -- report the post and we'll take a look.
  • Help i ned help whit scripts

    I Need Your Help
    Help i ned help whit scripts
    S Offline

    safin

    New member
    Member
    Dec 30, 2021
    56
    447
    53
    Sweden
    hi i would like some guide on how to go about making a scripts grateful if get answers for it
     
    maverick Offline

    maverick

    New member
    Staff member
    Moderator
    +Lifetime VIP
    Jun 6, 2020
    78
    1,608
    83
    Portugal
    you have to be more specific. we are in the time of magic, but here no one can guess what you need...
     
    ian Online

    ian

    Administrator
    Super Moderator
    Trusted Member
    +Lifetime VIP
    Member
    Apr 4, 2020
    2,583
    13,180
    153
    UK
    you have to be more specific. we are in the time of magic, but here no one can guess what you need...
    I need a guide who to do that ?
     
    S Offline

    safin

    New member
    Member
    Dec 30, 2021
    56
    447
    53
    Sweden
    i make this scrips to my xc ui panal befor is working good but now is not working i ned help how i can fix this agen


    <?php

    //http://127.0.0.1/karwan.php?id=kurdsat-news-tv

    $id=$_GET['id'];

    $d='
    Please, Log in or Register to view URLs content!


    $post= post($d);

    $post2=search($post,'src="/live/','"');

    $url='https://karwan.tv/live/'.$post2;

    $m3u=post($url);

    $m3u8=search($m3u,"hls: '","'");

    $m3u8=str_replace('playlist','chunks',$m3u8);

    header('Location:'.$m3u8);



    function post($po)
    {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $po);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, TRUE);
    //curl_setopt($ch, CURLOPT_POSTFIELDS,$po);
    //curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__).'/CW1');
    //curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__).'/CW1');
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch,CURLOPT_ENCODING, 'gz');
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
    'Accept-Encoding: gzip, deflate, br',
    'Accept-Language: es-ES,es;q=0.9,fr;q=0.8',
    'Cache-Control: max-age=0',
    'Connection: keep-alive',
    'Host: karwan.tv',
    'Referer:
    Please, Log in or Register to view URLs content!
    ',
    'Sec-Fetch-Mode: navigate',
    'Sec-Fetch-Site: same-origin',
    'Sec-Fetch-User: ?1',
    'Upgrade-Insecure-Requests: 1',
    'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36'

    ));

    $response = curl_exec($ch);
    curl_close($ch);
    return $response ;
    }

    function post2($po)
    {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $po);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, TRUE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch,CURLOPT_ENCODING, 'gz');
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
    'Accept-Encoding: gzip, deflate, br',
    'Accept-Language: es-ES,es;q=0.9,fr;q=0.8',
    'Cache-Control: max-age=0',
    'Connection: keep-alive',
    'Host: karwan.tv',
    'Referer:
    Please, Log in or Register to view URLs content!
    ',
    'Sec-Fetch-Mode: navigate',
    'Sec-Fetch-Site: same-origin',
    'Sec-Fetch-User: ?1',
    'Upgrade-Insecure-Requests: 1',
    'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36'

    ));

    $response = curl_exec($ch);
    curl_close($ch);
    return $response ;
    }


    function search($target, $start, $end){
    $start_at = strpos($target, $start) + strlen($start);
    $target = substr($target,$start_at);
    $end_at = strpos($target, $end);
    return substr($target, 0, $end_at);
    }



    ?>
     

    Create an account or login to comment

    You must be a member in order to leave a comment

    Create account

    Create an account on our community. It's easy!

    Log in

    Already have an account? Log in here.

    Top Posters of the Month

    Online statistics

    Members online
    92
    Guests online
    487
    Total visitors
    579
    18,376Threads
    64,417Messages
    63,103Members
    flindixvrLatest member
    Top