I try to take some information from a site lets call it x site (http://212.237.41.34/player.php?ch=b3) When i try to connect that site from my pc it redirect me to http://www.cndhlsstream.pw/ site.
This is my problem; when i try to get content of x site with curl or file_get_contents it returns me only "invalid connection".
How can i solve this problem ?
I see on the bottom of x site there is a script
<script>
if (top.location == self.location) {
top.location = "http://www.cndhlsstream.pw/";
}
</script>
I think this make this error but i cannot make any solution.
I try this but it still return invalid connection
$context = stream_context_create(
array(
'http' => array(
'follow_location' => false
)
)
);
echo file_get_contents('http://212.237.41.34/player.php?ch=b3',false,$context);