Jump to content

Simple coding help please !


Sangha-08

Recommended Posts

hi !

Ive got a simple .php page !

 

<p><center><embed 
src="/player.swf" 
width="540" 
height="438"
allowscriptaccess="always"
wmode="transparent" 
allowfullscreen="true" 
flashvars="file=/[color=red]script.php[/color]?video_url=http://www.veoh.com/videos/<?php print $_GET['file']; ?>&type=flv 
/></center></p>

 

the video does not work in Internet explorer , but i works perfectly fine in firefox ..

 

i want the script.php to  execute in the simple .php page. Heres the script for the script.php

 

 

<?php

$video_url = (isset($_GET["video_url"])) ? strval($_GET["video_url"]) : "http://www.veoh.com/videos/v12328090B88NR3bS";

getFlv($video_url);


function getFlv($video_url)
{
preg_match('/http:\/\/www.veoh.com\/videos\/(.*)/', $video_url, $match);
$details_url = 'http://www.veoh.com/rest/video/' . $match[1] . '/details';

if ($details = file("$details_url"))
{
foreach($details as $value)
{
// fullPreviewHashPath="http://content.veoh.com/flash/p/1288822/77c44b0448a3602f79d059c8e91e556ebf9e1b13.flv?ct=bf1913ed8788db2c804b5961e62ad111906735f5ca8e489c"
if(preg_match('/fullPreviewHashPath=\"(.*?)\"/', $value, $match))
{
$url = $match[1];
}
}
header('Location:' . $url);
}
}

?>

 

Notice: I want the script.php to execute in the same page. I tried to do it but i didn't work. Can someone help me ? please post the full script please.

Thank you.

 

 

Link to comment
https://forums.phpfreaks.com/topic/107213-simple-coding-help-please/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.