0

This is my html

<div align="center" class="embed-responsive embed-responsive-16by9" width="640" height="480">
    <video autoplay loop class="embed-responsive-item" controls>
        <source src="/projects/moviestream/php/stream.php">
    </video>
</div>

and my stream.php

// class definition of video_stream
$stream = new VideoStream($video_link);
$stream->start();

My question is how to pass the variable $video_link from my html to the php page so it streams the correct video?

Terry Djony
  • 1,975
  • 4
  • 23
  • 41
  • you can send it through javascript by making an ajax call. – Asad Mahmood May 07 '17 at 07:39
  • you can curl the page and then pass the page content. refer to this http://stackoverflow.com/questions/2313107/how-do-i-make-a-simple-crawler-in-php – LF00 May 07 '17 at 07:43

1 Answers1

0

Found a solution using just plain php!
I use a kind of php router that allows me to route movie/1 to VideoStreamer and invoking the method stream($id) wwith $id set to 1

Terry Djony
  • 1,975
  • 4
  • 23
  • 41