Home » Php » How to send the next GET Request?

How to send the next GET Request?

Posted by: admin September 25, 2018 Leave a comment

Questions:

Through the browser the request is sent (200),

But through PHP its fails (no data), How to send correctly?

$opts = array(
'http'=>array(
'method'=>"GET",
'proxy'=>"$proxy",
'header'=> "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0".
       "Accept-Encoding: gzip, deflate".
       "Accept: */*"
));
$context = stream_context_create($opts);
$url2 = "http://50.7.195.2:25461/live/***/***/6089.m3u8?token=HxZZBUsLRgMaAAAIUwpWAwcMCgUGWg8OAwBTCwBWVQFVDFBQXFoADFpEHBIRRkJRBFRnWVQbAw5VW18UFkdEABZrWAAaWUYNAVcCCEAeEkAMVF0SCgkVGhUKAhoOEAZVUw0CRhRBAUFMA0JeA15vUABPUVNVGwNWEA8KFBZdWToAUVwFVgdGAxpWEhxAW0NERwMaeRB/WEsRLQNMFH5jIUYYEwZRFxZYTAMSCkADBw1XGxQSU1ZMVhERHxoOEHAnRhgTAUAXAVdLD19eQAgSWVZMABIcG1BLOhEDS0BAUgQJUUNGAkFUGxREXVEabVNbC1ddU0RQVlYWQVwaBRAbRwlbXw1MDBZmSA9UElgQAQNdDgsSTQ==";
$data = file_get_contents($url2, false, $context);
echo data;
Answers: