I need a method to hide the file source in embedding code for the DivX player.
The file source is remote. I am trying to stream the file through a php file using the header. I am using 3 parts. 1:define the file path in a session. 2:embed the video reading file : stream.php. 3: redirect to video source.
Here is part 1, define file source:
<?PHP session_start();
$_SESSION["url_vid"] = "http://remote-server.com/file.avi";
?>
Here is the embed code (part 2):
<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="320" height="260" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">
<param name="custommode" value="none" />
<param name="autoPlay" value="false" />
<param name="src" value="stream.php" />
<embed type="video/divx" src="stream.php" custommode="none" width="850" height="400" autoPlay="false" pluginspage="http://go.divx.com/plugin/download/">
</embed>
</object>
here is the stream.php code :
<?PHP
session_start();
header("Location :".$_SESSION["url_vid"]);
?>
This isn’t working.
When it the DivX player is ran, it alerts with : “The DivX Plus Web Player could not download the video, please check your Internet connection” But when going directly to the stream.php file it begins downloading the file.
Does anyone know of any alternative ways to hide the file path. Or some way to fuss with the stream.php file to get it working through the DivX player.
I need to use the DivX player because it can read .avi files.
http://labs.divx.com/node/1304
Apparently DivX doesn’t do cookies too well. This could be the explanation. I don’t think it’s possible to do this.
You might want to look into setting some sort of a temporary key to pass to stream.php, which stream.php can lookup and then match to a URL to redirect to (and then delete the key preventing people from copying the link) – that is, if the problem isn’t because DivX doesn’t support redirects.