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
getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMI
problem with php server update from mid 2009
Hi,
I have this navigation menu on 2 websites which used to work just fine. After a recent up
Random Number Generation And Probability
Hello, I am working on a function which has to insert data into a SQL table.
we have to suppl
RadioButtonList data selection
view plaincopy to clipboardprint?email CODING Problem
Email coding problem.
I need to send a section of the info to $tf and the same as a Cc to $em
MySQL Does not UPDATE- SQLString Problem
vb Syntax (Toggle Plain Text)
1.
SQL = "UPDATE sampletable SET column1 = 'C1sample1'"
Alternate messaging
I have 4 strings in MySQL db1
$string1 : Hello
$string2 : Hi
$string3 : Great
$strin
Switch letters in message (basic cryptology)...
I am trying to switch letters around in a message for an application on my site (see here). The prob
Receive Rosettanet Message to SAP 4.6c
Dear all ,
My customer will send the PO details by rosettanet message , Is it
error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc