Embed Video Problem
Posted on
16th Feb 2014 07:03 pm by
admin
Hey, thanks for looking!
File to be embedded:
Code: <playlist version="1">
<trackList>
<track>
<title>SOCCER - RAINBOW</title>
<location>http://www.site.com/soccer-rainbow.m4v</location>
<duration>23:27</duration>
<info>
http://www.site.com/info.php?video=RAINBOW&title=SOCCER
</info>
<meta rel="type">m4v</meta>
<image>
images.php?title=SOCCER&video=RAINBOW
</image>
</track>
<track>
<title>SOCCER</title>
<location/>
<meta rel="type"/>
</track>
</trackList>
</playlist>
Embed code called by "embed.php?p=SOCCER&z=RAINBOW":
Code: <?php
$title = $_GET['p'];
$video = $_GET['z'];
$url2='http://www.site.com/media.php?title='.$title.'&video='.$video;
$sxml = simplexml_load_file($url2);
list($node) = $sxml->xpath('/playlist/tracklist/track/location');
header('Location: '.$node);
?>
I didn't write it too well, though :/. I just get a blank page. Can someone please help me fix it?
Also, I'm trying to limit usage on this embed script. I want only specified inputs to work with the script.
For example, in this script I define exactly what is allowed and the rest give a blank page:
Code: <?php
if (isset($_GET['url'])) {
$converter = array('blankspot' => 'blanks',
'SOCCERRAINBOW' => 'futbolyllber',
'blankspothere' => 'blank');
$url = $_GET['url'];
if (isset($converter[$url])) {
//The actual execution code takes place here
header('Location: '.$node['url']);
exit;
}
}
?>
How can I do the same thing for the first script?
Thanks for helping
No comments posted yet
Your Answer:
Login to answer
344
22
Other forums
When i am Canseling the Billing Document in VF11 I am getting Shortdump
Hi Experts
When i am Canseling the Billing Document in VF11 I am getting Shortdump.
Set Categories
I am creating a submission form for somebody to come in and submit products. These products are sep
show random images
hey guys
can someone please suggest a way in which the following code can be edited so it onl
How do I send data using an html link
Hi
If I have
<a href="main_file.php">
How do I send data t
Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us
Need Help with a query
Hello,
For some reason I am just not getting the right answer when I do this query and not quite
Select Lists into MYSQL
Hello All, I am new to PHP @ 1 week. So borrowing code anywhere I can. I am making progress, but h
Guixt issue
Hello all,
We are experiencing the following problem with Guixt:
Some transact
creating a 1 to 100 in a table
hi guys I am a newb in php need some help.
I have a table with 1 column and 100 rows and in
Performance impact of cookies
Hi, I was just wondering what impact there would be in terms of performance if you where to set then