Graxeon Posted November 29, 2009 Author Share Posted November 29, 2009 That's odd... Well, I got permission from the owner so here's the link: http://www.zideo.nl/media.php?playzideo=6b3447616f467478&zideo=6c49575a6e6c633d That page shouldn't have loading problems like my test page. Quote Link to comment https://forums.phpfreaks.com/topic/183240-load-file-in-php/page/2/#findComment-967452 Share on other sites More sharing options...
salathe Posted November 29, 2009 Share Posted November 29, 2009 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"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/183240-load-file-in-php/page/2/#findComment-967461 Share on other sites More sharing options...
Graxeon Posted November 29, 2009 Author Share Posted November 29, 2009 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> Quote Link to comment https://forums.phpfreaks.com/topic/183240-load-file-in-php/page/2/#findComment-967477 Share on other sites More sharing options...
MadTechie Posted November 29, 2009 Share Posted November 29, 2009 That's odd... Well, I got permission from the owner so here's the link: http://www.zideo.nl/media.php?playzideo=6b3447616f467478&zideo=6c49575a6e6c633d That page shouldn't have loading problems like my test page. In that case use that link, instead of http://fr33.ulmb.com/gr/xml.xml Quote Link to comment https://forums.phpfreaks.com/topic/183240-load-file-in-php/page/2/#findComment-967481 Share on other sites More sharing options...
Graxeon Posted November 29, 2009 Author Share Posted November 29, 2009 I've tried, that just gives a blank page. Quote Link to comment https://forums.phpfreaks.com/topic/183240-load-file-in-php/page/2/#findComment-967484 Share on other sites More sharing options...
MadTechie Posted November 29, 2009 Share Posted November 29, 2009 Well the XML are completely different! even without the 60 second count down, http://fr33.ulmb.com/gr/xml.xml will give an invalid URL ie http://www.site.com/soccer-rainbow.m4v http://www.zideo.nl/media.php?playzideo=6b3447616f467478&zideo=6c49575a6e6c633d is fine, but your need to update your code to suite! Quote Link to comment https://forums.phpfreaks.com/topic/183240-load-file-in-php/page/2/#findComment-967494 Share on other sites More sharing options...
Graxeon Posted November 29, 2009 Author Share Posted November 29, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/183240-load-file-in-php/page/2/#findComment-967507 Share on other sites More sharing options...
salathe Posted November 29, 2009 Share Posted November 29, 2009 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(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/183240-load-file-in-php/page/2/#findComment-967525 Share on other sites More sharing options...
Graxeon Posted November 29, 2009 Author Share Posted November 29, 2009 Now it's an exact copy of the link. It's being recognized as an XML file. Check yourself: http://fr33.ulmb.com/gr/grzid2.php Quote Link to comment https://forums.phpfreaks.com/topic/183240-load-file-in-php/page/2/#findComment-967531 Share on other sites More sharing options...
MadTechie Posted November 29, 2009 Share Posted November 29, 2009 Am I missing something but surely this would work! <?php $sxml = new SimpleXMLElement('http://www.zideo.nl/media.php?playzideo=6b3447616f467478&zideo=6c49575a6e6c633d', NULL, TRUE); header("Location: {$sxml->trackList->track->location}"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/183240-load-file-in-php/page/2/#findComment-967535 Share on other sites More sharing options...
Graxeon Posted November 29, 2009 Author Share Posted November 29, 2009 WORKS! Thank you VERY much everyone! Quote Link to comment https://forums.phpfreaks.com/topic/183240-load-file-in-php/page/2/#findComment-967542 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.