Reputation: 823
I am having a iframe withing facebook fanpage , the inner iframe is at my server
a link opens the same FanPage again in pop up using window.open
javascript attaching a query string to it
window.open(path,'mywindow','scrollbars=yes,toolbar=no,menubar=no,status=no,width=805,height=400');
Variable path is same fanpage location with querystring attached to it
http://www.facebook.com/pages/mypagename/234234234?sk=app_3457124854683&a=1&b=10000
I need to get variables using php &a=1&b=100002212364645
Can somebody provide a way to access this in PHP?
Upvotes: 0
Views: 1189
Reputation: 161
This works for me you can modify it according to your code.
$parent_url = explode('?',$_SERVER["HTTP_REFERER"]);
$strings = explode('&',$parent_url[1]);
$_SERVER["HTTP_REFERER"] it shows the parent URL of the iframe.
You can use $strings as you can.
Hope you like that.
Upvotes: 0
Reputation: 823
The only solution i can come up with is(which i actually forgot to Jquery Ajax when i am opening another window(pop up) and perform the action using AJax IT WORKS :)
Upvotes: 0
Reputation: 4492
you may be able to do that using JavaScript using analytic and this would be through referrer. Try using the referrer in php as iframes usually have the parent url as the referrer. But referrers maybe blocked by the user clients.
Upvotes: 1