Answer the question
In order to leave comments, you need to log in
What is the correct way to encode the URL to be passed as a GET request field?
We need to write a couple of functions to unambiguously encode and decode any URLs (web addresses) to a forum (and vice versa) in which they can be made the value of a parameter of a valid other URL for a GET request. Please tell me the logic of such a function - what should be replaced with what, what should not be replaced with anything.
Answer the question
In order to leave comments, you need to log in
As far as I understand you, encode the collected url that you want to use as a parameter as another parameter. PHP example
$paramURL="http://my.site/?q=%20test%20"
$targetURL ="http://my.site/?back_url=" . urlencode($paramURL);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question