I am trying to pass a variable through a GET request (which i am defining myself).
So my variable stores a url, and if someone passes d = site.com it should allow access. if not, it should fail. The only thing that is failing is passing the variable through the get
Doesnt Work:
$redirect = site();
$parse = parse_url($redirect);
$next = $parse['host'];
if ($_GET['cld'] !== $next ) redirect();
Does Work (static, not dynamic, so it doesnt get the URL)
$redirect = site();
$parse = parse_url($redirect);
$next = $parse['host'];
if ($_GET['d'] !== 'site') redirect();