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
DB2 for z/OS, LUW, iSeries
Hello,
In this forum a lot of threads related to other members of the DB2 family than DB2 for z/OS
switch form actions? not working
i want on submit to go to different pages according to the CatID
Code: <?php $CatID=$_
simple script won't work. Please help
I'm new to php, and I am having trouble displaying a simple script in my web browser. My php code ex
help with calculations on a flat text file
hello,
I have this code below that is attached to a flat file like this:
Email:LastName:FirstN
ALV grid with 2 headers
Hi Gurus,
I need to display ALV GRID as below.
Header1
Inserting Data into a MS Access DB using PHP.
As part of my uni course I am doing a placement at a company whom want me to create a client zone fo
sql problems
I am having a small problem with my sql statement. it is inserting into 4 of the fields.
fie
php problem?
I don't think I'm stupid, but maybe I am.
I am working on a sit for a friend I am try to put
Procedural to OOP
ohn Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO pri
Sort Alternative/bi-monthly
Hi all,
Am going mad trying to get something to work.
I'm creating a CMS for a magazi