So far, I can place the first URL parameter and its value into variables - from child (iframed) page.
E.g http://google.com/?x=123 I can get x=123
I have used this code for the page (child) that is iframed.
<?php
//Getting the parent window parameters
$getURLVar = str_replace("?","",strrchr($_SERVER['HTTP_REFERER'],"?"));
$getURLVar = str_replace("&","=",$getURLVar);
$getURLVar = str_getcsv($getURLVar,"=");
$i=0;
foreach ($getURLVar as $value)
{
if ($i % 4)
$value1[$i]=$value;
else
$value2[$i]=$value;
$i++;
}
// $getURLVar =array_combine($value2,$value1);
//print_r($getURLVar);
list($v1, $v2) = $getURLVar;
echo "$v1";
echo "$v2";
?>
Question: What if I had more than 1 parameter? E.g http://google.com/&x=234&results=10
Please help me amend the above to support more than 1 parameter.
Thank you