Is it possible to urlencode a URL via $_GET? Cause i've tried it..... doesn't seem to work, while $_POST works perfectly.
I've noticed the character '#' being left out (and everything behind it) e.g. www.domain.com/files/list.htm#thelist , so 'thelist' dissapears including the '#'.
I think you need to apply urlencode() BEFORE you create the URL and use urldecode() on the receiving side.
Well, how can i place the encode even earlier? I mean right now i placed it at the moment it gets it from the browser ($_GET), i can't do it any earlier than that...
In your receiving script (or called script), you should DECODE what has been received and not ENCODE.
urlencode() needs to be on the page that has the link that was clicked on (the sending page).
urldecode() needs to be on the page that is being called by that click (the receiving page).
Okay... so the user types in ?url=www.blahblah.com , it gets recieved by the script and does something with it, BUT when there are characters like # etc. in the URL it gets all screwed up, so i should DECODE the ?url= input?? Kinda odd because i didn't encode anything lol..
Yes, i had that already (look at my first post). I put the user input in $url via $_GET, however when a '#' comes up it ignores it, THATS the problem...
One has to question the practical use of using a # for server-side scripting. It doesn't add any thing to what can be done. The OP might as well use an additional get (&picketfence=top).
Tried it and that works, but of course the user has to know that '#' is '%23'... which isn't likely... maybe it can be done with JS to automatically convert' #' into '%23' ? Just a thought because my knowledge of JS is pretty much none existent.
Bookmarks