I have 2 files. The first is a PHP generated XML file that's dependent by 2 inputs. The second is a PHP file that grabs the content of the XML file.
So I have this:
site.com/xml.php?p=RAINBOW&z=SOCCER
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>
I want to grab the contents of the "location" tags.
So, I have this now:
media.php?p=RAINBOW&z=SOCCER
Code: $title = $_GET['p'];
$video = $_GET['z'];
$myXML = 'www.site.com/xml.php?p=' .$title. '&z='.$video;
$sxml = simplexml_load_string($myXML);
list($node) = $sxml->xpath('/playlist/trackList/track/location');
header("Location: $node");
But I get the error "Fatal error: Call to a member function xpath() on a non-object on line 9".
What variables did I mess up? Can someone help me fix it, please?
Multi language - seo links
Im trying to figure out the best method to have a multi language website that will function with seo friendly links.The code that ive used many times before.....Code: $_SESSION['lang'] = $lang =
Count on multidimensional array
Hi, i got an array as below:Array( => Array ( [2009-12-08] => 1 ) [1] => Array ( [2009-12-07] => 1 ) [2]
php file erros / need help please
HelloSomeone decoded a zend file for me.. after uploaded it on ftp i get some errors, i tryed to fix but (dont know if what it did is right, i dont have skills in php) now im stuck and i dont know
Find occurences of unicode characters in string
I need to prohibit filenames with everything but English characters and numbers but regexp and string function don't seem to work because they consider the Greek alphabet letters as part of the A-Z
does anyone know a php script to send mail using gmails/googles free smtp server
cause i heard u can do that but i dont know how
First root of a number
Hi, I can't find any function in php to give me the first root of a number.Is there any built-in function for it? For example: 81 => 39 => 364 => 2256 => 2I wrote this
help with multi-update
Now sure how to ask this really....
fwrite error
Hi All,Does anyone know what is causing the error in this code?Code: <?$errorLog_FilePath = "error_log.txt";$handle = @fopen($errorLog_FilePath,'a+');$strError =
captcha error
I have been trying to implement a captcha in php...here is the code..Code: (php) [Select]<?php// Set the content-typeheader('Content-type: image/png');// Create the image$im =
eregi to preg
Im converting my regex for php 5.3 and I am stuck on the followingCode: [Select]if((eregi("<[^>]script*\"?[^>]*>", $secvalue)) ||