1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

new line and enter in url encoding

Discussion in 'HTML & Website Design' started by redhits, Jan 31, 2010.

  1. #1
    I know that space is %20 in url enconding, but how do you write a new line in url enconding?

    \r\n won't work , lol , also how i can write an enter in url enconding?
    i need to send some varibles to a C++ script via an GET method,lol
     
    redhits, Jan 31, 2010 IP
  2. lkraj

    lkraj Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #2
    It's better to do a POST method. But if you have to use GET method, \n can be urlencoded as %0A
     
    lkraj, Jan 31, 2010 IP
  3. redhits

    redhits Notable Member

    Messages:
    3,023
    Likes Received:
    277
    Best Answers:
    0
    Trophy Points:
    255
    #3
    and enter?
     
    redhits, Jan 31, 2010 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You know that's a popular hack, right?

    People add in their own newline and then their own scripts. Not sure it would work with C++ (it's usually used with PHP sites), but if you need special characters like that, either read the RFC about URLs, and if there is nothing for Enter, that should be a sign that you're going where there be dragons, and like lkraj said, use POST.
     
    Stomme poes, Jan 31, 2010 IP
  5. redhits

    redhits Notable Member

    Messages:
    3,023
    Likes Received:
    277
    Best Answers:
    0
    Trophy Points:
    255
    #5
    enter is a popular hack ? lol
     
    redhits, Jan 31, 2010 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    newlines are, yes.

    Esp since there are a few of them. carriage return, form feed, new line... "return".

    SQL injections use it, for an example.

    Anyway, read the rfc, where it says everything you can do.
     
    Stomme poes, Jan 31, 2010 IP