Anyone using Apache’s mod_rewrite to handle HTTP requests will know that your $_GET variables are no longer recognised by the server as the URI is treated as a single string value.
PHP has a function, called mb_parse_str(), that parses the query string representation of an array into a multi-dimensional array. This can be used to correctly represent the query string part of the URL.
The below function returns an array that holds the same values you’d expect from $_GET.
function get_http_vars(){ $query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY); mb_parse_str($query, $get); return $get; }
To use the function simply follow the example below;
$get = get_http_vars();
WP Themes | June 11, 2010 at 11:42 pm
Amiable dispatch and this mail helped me alot in my college assignement. Thank you on your information.
Wordpress Themes | June 24, 2010 at 9:50 pm
Genial post and this mail helped me alot in my college assignement. Thanks you on your information.
Wordpress Themes | July 2, 2010 at 6:07 am
Nice post and this mail helped me alot in my college assignement. Thank you for your information.