So... I have the following code which is very simple:
<?php echo $_GET["base_grant_url"] ?>
Currently, this is just for testing. I am having problems though... when the following URLs tested with:
http://localhost/?base_grant_url=htt%3A%2F%2Fn00.test.com
http://localhost/?base_grant_url=http%3A%2F%2Fn00
The parameter is printed properly. Notice the missing "p" in the first and no "." characters in the parameter in the second. When the following 2 URLs are passed:
http://localhost/?base_grant_url=http%3A%2F%2Fn00.test.com
http://localhost/?base_grant_url=http%3A%2F%2Fn00.
Both of these addresses print back absolutely nothing... it took me quite a while to narrow my problem down to this as this is a small part of a larger scenario but this is what I am currently trying to correct. Why am I unable to get the parameters when they are incorrect but when they have HTTP and a "." character in them... the $_GET function fails? Is there some common convention I am missing or some simple fix to this problem?
EDIT: So after testing on a local test server it works fine. I will be contacting my hosting provider to try and find the issue.
as for the output for print_r... here is the code and output:
CODE:
echo "Base Grant URL = ";
echo $_GET["base_grant_url"];
echo " -=- GET = ";
print_r($_GET);
Test 1 (no "." in parameter also this works if http is not in parameter):
URL: http://testserver.com/?base_grant_url=https%3A%2F%2Fexamplecom%2Fsplash%2Flogin%2F%3Fmauth%3DABCDEFG123456
OUTPUT: Base Grant URL = https://examplecom/splash/login/?mauth=ABCDEFG123456 -=- GET = Array ( [base_grant_url] => https://examplecom/splash/login/?mauth=ABCDEFG123456 )
Test 2 (with proper URL):
URL: http://testserver.com/?base_grant_url=https%3A%2F%2Fexample.com%2Fsplash%2Flogin%2F%3Fmauth%3DABCDEFG123456
OUTPUT: Base Grant URL = -=- GET = Array ( )
http://localhost/test.php?base_grant_url=htt%3A%2F%2Fn00.test.com