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
mySQL and PHP search
Hello,
I am trying to code a project and ran into a brick wall with one of my pages. I am pretty
Help with setcookie()
Merry Xmas to those on this foruum
Older guy here with some experience but not allot so please be
URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But
Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th
Sendmail.php - heading error following check_input
Hi,
I would greatly appreciate some help? I am brand new to PHP and have been searching and e
Email Script does not reach destination
Hey Guys look at this code snippet :
Code:
//read a line from the file
$myFile = "
Firefox displaying PHP source code??
Currently testing a site thats almost built, am going to be including php on a sidebar on all pages
Need help making a script that moves data into acrhive table
Hi,
I'm kinda new to php/mysql
And i wrote a simple script to store sales lead for a b
values in array being escaped
I would like to submit some values - back to the same form for checking before processing...
modifying query string with no page refresh
Hi everybody,
I've tried to get info about my problem all over the internet but i didn't find out