Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query string parse code #7

Open
obrien66 opened this issue May 3, 2017 · 0 comments
Open

Query string parse code #7

obrien66 opened this issue May 3, 2017 · 0 comments

Comments

@obrien66
Copy link
Collaborator

obrien66 commented May 3, 2017

The code for parsing query strings is literally the worst thing on the face of the earth.

$string = $_SERVER['QUERY_STRING'];
$string = str_replace("%23", "#", $string);
$string = str_replace("%24", "$", $string);
$string = str_replace("%25", "&", $string);
$string = str_replace("%26", "+", $string);
$string = str_replace("%2B", ".", $string);
$string = str_replace("%2C", "/", $string);
$string = str_replace("%2F", ":", $string);
$string = str_replace("%3C", "<", $string);
$string = str_replace("%3E", ">", $string);
$string = str_replace("%3B", ";", $string);
$string = str_replace("%3D", "=", $string);
$string = str_replace("%3F", "?", $string);
$string = str_replace("%40", "@", $string);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant