A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: hmmm....tupps php script to load data from another server

  1. #1
    .::POOP::.
    Join Date
    Aug 2000
    Posts
    260
    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?

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    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

  3. #3
    .::POOP::.
    Join Date
    Aug 2000
    Posts
    260
    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]

  4. #4
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    you need to use double quotes
    "http://.... $current"
    otherwise the literal string $current is sent rather than the value

    Musicman

  5. #5
    .::POOP::.
    Join Date
    Aug 2000
    Posts
    260
    awesome...thanks again
    You are the MAN!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center