Get content from a site whose URL changes

0

I'm trying to get a video from a website.

I can get the URL where this video is located, but when I run the command curl or file_get_contents it will not.

The strange thing is that if I put the same link in the browser it goes in, and it also does not work on a iframe .

Code I made file_get_contents :

 <?php
    $dados = file_get_contents($_GET['vit']);
    $video2 = explode("video_alt_url: '",$dados);
    $video2 = explode("'",$video2[1]);
    print $video2[0];
?>

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

</head>
<body>
<nav class="navbar navbar-light bg-light">
  <a class="navbar-brand">teste 1.0</a>
  <form class="form-inline" action="pesquisa.php">
    <input class="form-control mr-sm-2" type="search" name="pesquisa" placeholder="pesquisar" aria-label="Search">
    <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Busca</button>
  </form>
  </nav>
  <center>
<video width="80%" height="50%" poster="" controls>
  <source src="<?=$video2[0]?>" type="video/mp4">
  <source src="<?=$video2[0]?>" type="video/ogg">

</video>
</center>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</body>
</html>

In curl :

  <?php
    $url= "https://www.javwhores.com/index.php";

    $dados = file_get_contents($_GET['vit']);
    $video2 = explode("video_alt_url: '",$dados);
    $video2 = explode("'",$video2[1]);
    print $video2[0];


$ch = curl_init();
$timeout = 0;
curl_setopt($ch, CURLOPT_URL, $video2[0];);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$conteudo = curl_exec ($ch);
curl_close($ch);
print $conteudo;
?>

The value of $_GET['vit'] is https://www.javwhores.com/video/58003/hodv-21334 .

    
asked by anonymous 10.11.2018 / 00:49

0 answers