"80", CURLOPT_URL => "http://udoofree.com/movie2/".$a."/single-live?watch=1", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => "user_agent: vlc 1.0.1")); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { $dau = strpos($response,'token='); $cuoi = strpos($response,'&remote'); $token = substr($response, $dau, $cuoi - $dau); echo $token; $cn='http://139.99.27.33:9998/'.$b.'/index.m3u8?'.$token; header("Location:".$cn, true, 301); } } ?>