Jump to content

Load file in PHP


Graxeon

Recommended Posts

What do you get if you have a PHP page containing the following:

 

<?php

ini_set('display_errors', 'On');
error_reporting(E_ALL);

header("Content-Type: text/plain");
echo file_get_contents("http://www.zideo.nl/media.php?playzideo=6b3447616f467478&zideo=6c49575a6e6c633d");

?>

Link to comment
Share on other sites

That gives this:

 

<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<title>Zideo</title>
<location>http://storage.zideo.nl/24851/109759.m4v</location>
<duration>23:27</duration>
<info>http://www.zideo.nl?zideo=6c49575a6e6c633d&playzideo=6b3447616f467478</info>
<meta rel="type">m4v</meta>
<image>mediaswf.php?playzideo=6b3447616f467478&zideo=6c49575a6e6c633d&id=6c594b546e3135766e49453d&sharer=&.png</image>
</track>
<track>
<title>6b3447616f467478</title>
<location></location>
<meta rel="type"></meta>
</track>
</trackList>
</playlist>

Link to comment
Share on other sites

I just made the second XML as a copy that I can replace values with. It's the same thing, just different values. It was because I couldn't give out the actual content without permission with the owner.

 

But again, I've done it with the real link. Here it is:

 

<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://www.zideo.nl/media.php?playzideo=6b3447616f467478&zideo=6c49575a6e6c633d');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$myXML = curl_exec ($curl);
curl_close($curl);

$sxml = simplexml_load_string($myXML);
list($node) = $sxml->xpath('/playlist/trackList/track/location');
header("Location: $node");

?>

 

That gives a blank page: http://fr33.ulmb.com/gr/grzid2.php

Link to comment
Share on other sites

What happens if you use the following file?

 

<?php
$sxml = new SimpleXMLElement('http://www.zideo.nl/media.php?playzideo=6b3447616f467478&zideo=6c49575a6e6c633d', NULL, TRUE);

header('Content-Type: application/xml');
echo $sxml->saveXML();
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.