Jump to content

Check my setup, please? Also, a question.


Graxeon

Recommended Posts

1. Can someone check to see if i setup the script correctly? I'm trying to grab whatever is in "path=" under "_video" from this page: http://www.sqweasel.com/flv_player/data/playerConfigEmbed/140.xml

 

2. I'm trying to add the text ".xml" after the input. I don't know how to make this: http://www.sqweasel.com/flv_player/data/playerConfigEmbed/INPUTHERE.xml

 

Here's the script:

 

<?php
$allowed_url = array("140", //test start
"224");

//get the url from the url - lol
$passed_url = $_GET['url'];

foreach ($allowed_url as $allowed) {
     if(stristr($allowed, $passed_url) !== false) {
  $url='http://www.sqweasel.com/flv_player/data/playerConfigEmbed/'.$_GET['url'];
  $sxml = simplexml_load_file($url);

  list($node) = $sxml->xpath('/playerConfig/_video');
  header('Location: '.$node['url']);
           exit;
     }
}

   header("Location: http://www.google.com/");
?>

Link to comment
https://forums.phpfreaks.com/topic/138906-check-my-setup-please-also-a-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.