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 Like 22 Dislike
Previous forums Next forums
Other forums

SuperCali PHP Event Calendar
does anyone have any experience with the SuperCali PHP Event Calendar? I could use some assistance

Reg Ex
Im trying to search for the string: srv_9 (Dead ???)

I thought to use preg_match, however I d

PO Release Strategy Issue
Hi Experts,

I am facing an issue related to PO release strategy. The details are-
<

Variable Clash
In the past I've had variables clash. For example:

Code: <?php
$c = 5;
$ca

form variables from database help.
Hi all,

I would like to have a form that gives you options based on the results of an mysql q

How to read CSS message data
Hi,
I have a requirement here. When working as a Dev angel for multiple customers its really di

Php script to read msword file
hi,

I need to read a msword file and i want to print the contents in that word file.

i

Is it a good practice to store user info. in sessions?
I am making a user class for my script which stores all the user information in sessions. It takes u

File upload issues
Hi Guys,

Can anyone see any issues with this code:
Code: [Select]$setImage= 'productimages

why aint this working?
i have this code:

Code: $num = 250;
$count = ($num - $rcount);

echo $rc

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash