Removing Query Paramater

Discussion in 'PHP' started by Formula 1 Forum, Jul 23, 2010.

  1. #1
    Hi

    I've got a problem with a piece of code and I have been told that I need to "Remove all the query parameters in the string" but not how to do it. This is the code I need to remove the query parameters from:

    $card_string = fetch_file_via_socket($fetch_url . "?bot=Live_" . $gxblprod['version'] . "&ref=" . $vbulletin->options['bburl'] . "/live.php");
    PHP:
    Any ideas on what I have to remove? I don't understand PHP, so I don't know how to do it.

    Thanks in advance,

    F1F
     
    Formula 1 Forum, Jul 23, 2010 IP
  2. Deacalion

    Deacalion Peon

    Messages:
    438
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Same code, with parameters removed:

    
    $card_string = fetch_file_via_socket($fetch_url . '/live.php'); 
    
    PHP:
     
    Last edited: Jul 23, 2010
    Deacalion, Jul 23, 2010 IP
  3. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #3
    this should be either
    $card_string = fetch_file_via_socket($fetch_url . "/live.php" . "?bot=Live_" . $gxblprod['version'] . "&ref=" . $vbulletin->options['bburl']);
    PHP:
    or
    $card_string = fetch_file_via_socket($fetch_url . "/live.php");
    PHP:
    or
    $card_string = fetch_file_via_socket($fetch_url);
    PHP:
    meaning those parameters should be at the end of url or not at all
     
    atxsurf, Jul 23, 2010 IP
  4. Formula 1 Forum

    Formula 1 Forum Guest

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the replies :D Tested all 3 options and non seemed to work :(

    Now been told that apart from just removing the query parameter, I need to

    All this seems to be a foriegn language to me :confused:
     
    Formula 1 Forum, Jul 23, 2010 IP
  5. Deacalion

    Deacalion Peon

    Messages:
    438
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #5
    'effectively anonymise the request'... ugh, he means use a proxy.
     
    Deacalion, Jul 23, 2010 IP
  6. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #6
    whoever adverses you should implement this for you as well.
     
    atxsurf, Jul 23, 2010 IP
  7. Formula 1 Forum

    Formula 1 Forum Guest

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Formula 1 Forum, Jul 23, 2010 IP