Results 1 to 4 of 4
  1. #1

    PHP arguments in arguments

    Is it possible to do something like this:'

    An argument with arguments in it?

  2. #2
    Join Date
    Apr 2009
    Pittsburgh, Pennsylvania
    yes, but the code would have to be parsed differently.

    You would take the uri string and parse it to fit our needs.


    which would result into an array of file. Atleast, that is how i do it with post.. just this is using get instead, same concept i would think.

  3. #3
    Join Date
    May 2009
    You can always grab the request data and parse it any way you like. PHP provides a handy syntax to send arguments as arrays already, so why not use it?

    If you need to pass any URI characters, a common example being passing a reference URL to an authentication scheme, be sure to run the string through urlencode(). You wouldn't need the quotes around your last example'd essentially have this:

    PHP Code:
    php -'echo "" . urlencode("page2.php?file=something.jpg") . "\n";' 
    Then, on the other side

    PHP Code:
    $files explode('file='$_GET['file']); 
    PHP should decode the URL-encoding automagically for $_GET vars...

  4. #4
    I couldn't get it to work. Thanks for your help though, I think i just did something wrong. I did something else and it works. Basically, I'm using NiftyPlayer (, an excellent little Flash mp3 player, to play music. The music is encrypted. To play the music, you embed nifty player like this:


    I needed to decrypt the music before playing so I tried this:


    This didn't work so I tried your suggestions but I don't think I did them right. What I ended up doing is to modify niftyplayer to append decrypt.php?file= to the file path it is given. This works perfectly. Thanks for your help though, I really do appreciate it!

Similar Threads

  1. Cron not working for PHP arguments
    By sh4ka in forum Hosting Security and Technology
    Replies: 5
    Last Post: 08-11-2009, 11:18 AM
  2. Through The Game Panel Arguments -
    By acquiresolv in forum Hosting Software and Control Panels
    Replies: 15
    Last Post: 11-29-2005, 01:27 PM
  3. A Husbands diary of arguments with the wife
    By GoTek-JP in forum Web Hosting Lounge
    Replies: 14
    Last Post: 04-09-2005, 06:53 PM
  4. arguments
    By sharkman in forum WHT Announcements, Feedback and Questions
    Replies: 2
    Last Post: 10-03-2002, 01:26 AM
  5. Sick of arguments in threads
    By tazd9t9 in forum Web Hosting Lounge
    Replies: 20
    Last Post: 08-02-2002, 06:31 PM

Posting Permissions

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