Go
Not registered? Sign up!

PHP Script Join Player+FLV

Google Translate
4 posts | return to the Modules forum | get the rss feed for this thread

Sep. 11, 2009X-PC

Hello,

I need join FLV with player, for this i need pass parameters from php to player.

i try

video.php
<?
$_GET[file] = "http://link/video.flv";
$_GET[image] = "http://link/image.jpg";

$url = "dirtoplayer/player.swf";
header("Content-type: application/x-shockwave-flash");
header("Content-Length: " . filesize($url));


readfile($url);

exit;
?>


With http://localhost/video.php i get the player in full, more no video.
If i provide parameters in url (http://localhost/video.php?file=video.flv&image=myimage.jpg) i get full player with video and pre load image.

I need embed with is.

<embed src="http://localhost/video.php?v=5Das0eH6" width="500" height="400" ">

As YouTube.

Thanks

Sep. 11, 2009lost

 
You can easily do this in Firefox using a 302 Redirect. However, there's a bug in Internet Explorer that causes the wrong parameters to get sent to the Flash Player. You can work around the bug with Rewrite rules on your server.

Test Page: http://willswonders.myip.org:8074/Simple_Embed.html

Look in the page source for four links to info. about the bug.

The PHP script video.php
<?php

$v = (isset($_GET['v'])) ? strval($_GET['v']) : 'LTQeAdweZ-Y';

$url = "http://willswonders.myip.org:8074/player-4.6.341.swf?image=http://img.youtube.com/vi/" . $v . "/0.jpg&file=http://www.youtube.com/watch?v=" . $v;

//print $url; exit;

header("Location: " . $url);
exit;

?>

Sep. 14, 2009X-PC

Hi,
I had managed to do this way. but I want it to youtube, do not appear to link the actual video

example http://www.youtube.com/v/7B08itXiXok

Sep. 14, 2009lost

 
Your YouTube video plays fine for me in Firefox.

    http://willswonders.myip.org:8074/Simple_Embed.html

I didn't setup the Test Page to work in Internet Explorer.

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.