I made this script to get the url and extract the value of the info variable. It works great, but I need to know if there is a better way to rewrite this to be a smaller amount of code. I think it is quite bulky looking.
It can be tested by simply using a url like this:
It should only echo: testdata
$s = preg_match("/\\?info=(.*)(
[&])/i", $_SERVER['REQUEST_URI'], $matches);
if ($s !== false)
$tmp = str_replace('&', '', $matches);
echo $info = str_replace('?info=', '', $tmp);