-
ok... im using tupps php script to load xml data from another server. the original script looks like:
Code:
<?php
echo join ('', file ('http://www.whatever.com/whatever.xml'));
?>
Now...i kinda need to define a variable ($current) and add it to the end of the url to load differnt xml data like:
Code:
<?php
echo join ('', file ('http://www.whatever.com/whatever.cgi?current=$current'));
?>
But the variable $current is defined in flash. How do i ask this...my php script is called request.php so is it possible to load request.php?current=ANY NUM and whatever current equals, that number is added to the end of the url inside the php?
does that make sense?
-
Hi,
php before 4.1 autoamtically did what you are looking for. Adding the stuff to the end of the request.php just defined the var inside php.
This feature has gone due to a potential security problem. You now have to add a line
$current = $_GET['current'];
to your php script
Musicman
-
AHHH...forgot about that...thats what i was looking for
Thanks
---------------
wait.... if i go to whatever.com/request.php?current=7
it still doesnt do what i want
again...here is the php:
Code:
<?php
$current = $_GET['current'];
echo join ('', file ('http://67.81.10.155:8600/playlist.cgi?current=$current'));
?>
http://www.snizzy.com/flash/request.php <-- the <song> tags start at 0 and end at 6
http://www.snizzy.com/flash/request.php?current=7 <-- the <song> tags SHOULD start at 7 and end at 13
????
[Edited by shreder540 on 08-02-2002 at 02:06 AM]
-
Hi,
you need to use double quotes
"http://.... $current"
otherwise the literal string $current is sent rather than the value
Musicman
-
awesome...thanks again
You are the MAN!