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?
Business Health Check
Hello I need to create an online business health check for a client it will be multiple choice and about 50 questions but the client has requested that the output/results of the health check needs to
PayPal Redirect Issue
When I have my paypal button set so that is redirects to http://empiremarketing.ca/order.php,it works just fine. But when I change the redirect URL to something like:
Creating an invoice
Using fpdf I am trying to create an invoice to send to clients. The products are sold in pricing tiers.I've got it working so it only displays a tier if the quantity is greater than 0 but I end up
TCP Sending Unsigned Char...
Hi...
db entry based on primary key
My "topics" table contains 10 entires*--------------*topicid topic------*--------------* 01 Bye 02 Hi 03 Hello..... 10 Morning*--------------*<?php
phph within href not showing php if change ? to &
Code: [Select]<a href="<?php echo $puser; ?>?m=<?php=(($m-1)<1) ? 12 : $m-1 ?>&amp;y=<?php =(($m-1)<1) ? $y-1 : $y
Help with file_get_html
The following code gives the expected results:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have seen this in just about every book I have ever read, never with any explanation, yet I know from
Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.However it ruins html and bbcode tags.. . I only want it to have affect on everything else within $text but not
convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javascript array. is this possible? I tried with Json_encode but it doesn't seem to work. is there