URL Variables

Discussion in 'PHP' started by Kennedy, Nov 27, 2007.

  1. #1
    Kennedy, Nov 27, 2007 IP
  2. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm sure this could be done more efficently but..........
    foreach ($_GET as $k=>$v) {
          print $k;
    }
    Code (markup):
     
    matthewrobertbell, Nov 27, 2007 IP
  3. serialCoder

    serialCoder Guest

    Best Answers:
    0
    #3
    that site is probably using mod_rewrite so the querystring itself is kind of obsfucated(spelling?), or hidden, normally you get the querystring through $_GET['var_name'] but if you dont know what their names are(which is kind of weird) you can use the code above provided by matthewrobertbell :D
     
    serialCoder, Nov 27, 2007 IP
  4. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    $_SERVER['QUERY_STRING']
    PHP:
    ?
     
    decepti0n, Nov 27, 2007 IP
  5. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #5
    $_SERVER['QUERY_STRING'] should do fine.

    Peace,
     
    Barti1987, Nov 27, 2007 IP
  6. Kennedy

    Kennedy Peon

    Messages:
    994
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Awesome. Thanks, guys.
     
    Kennedy, Nov 27, 2007 IP