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
Add code to enable passing of checkbox variable on login
Ok, I have a login page, but want to add a checkbox that when checked and successful login is made i
How can I get my program to read a larger array ??
Hi:
I have this program that reads from an array to do calculations. The array are just t
Table colours fail when extra row added
Hey Gurus,
I got a weird problem with formating the colour of a table made in php. Everything
help connecting a form to php and then emailing the form
Ok. So, I made a form, and I need help to where when submitted, I get an email with the submitted de
Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does
Get dump of MySQL DB from Live Site
I'm after an easy, but secure way of generating and importing a MySQL dump from a remote server.
need good snippet manager
Hi. as i am coding and learning more, it is becoming difficult to manage code snippets. how you mana
Operating System
How in PHP or other language can I detect Operating system, ie Windows XP Home, Windows 7 Ultimate,
php mysql query from input textbox
Hi,
I have a text box, in that i have given the mysql query. I can able to get the query in v
SMTP server...
I recently found a tutorial online on SMTP authentification for sending emails from webpages, here i