How to break a frame during a redirect?

o hai guyz

New member
Jan 15, 2010
917
8
0
I have a generic lp on my server with multiple domains pointing to it from namecheap with frame redirects. The user is then redirected from the lp to the offer page, but the offer is still framed since it doesn't have a built-in frame break. The advertiser doesn't want any framed traffic and has told me that I can't do this because they want the long ass affiliate link to be shown in the URL bar when the user sees their site. Is there any way for me to break the frame myself DURING the redirect (not immediately when the user visits my site), so that my lp is framed but the offer page isn't?
 


target="_top" breaks frames.

Thanks, I tried that in html and it works. But my redirect is on a php page, and I'm horrible at php. Here's the basic idea:

PHP:
function redirectpage(){
alert('<?php echo $_GET['id'];?> found!');
window.location="redirect-sub.php"
}

it's actually within a javascript popup so it pops up and says "[id] found!", user clicks "ok" and is then sent to redirect-sub.php. So I basically need the php version of target="_top".
 
Edit: Ignore that ^. I figured it would be easier to send the user first to a separate page like break.php and all that break.php does it break the frame and then redirect the user to the next page. That being said, I still don't know how to break the frame in php, can anyone help?
 
Can't be done from PHP, as the webserver doesn't have the right to take an already-processing HTTP request and change the target window.
I would make "break-iframe-and-redirect.html" file, send your (iframed) clicks there, and put in javascript --
Code:
parent.window.location = 'http://makemoniesonline.com';
 
  • Like
Reactions: o hai guyz
Can't be done from PHP, as the webserver doesn't have the right to take an already-processing HTTP request and change the target window.
I would make "break-iframe-and-redirect.html" file, send your (iframed) clicks there, and put in javascript --
Code:
parent.window.location = 'http://makemoniesonline.com';

Thanks, that worked perfectly.