Using PHP to build HTML frames
Posted: Tue Jan 06, 2009 6:08 pm
Hi all,
I am using PHP to open a new browser window to a affiate site which works well most of the time, however they are using a geo-location script which does not work well with non USA traffic. The only solution I can work out is to open a window in a frame (small top frame, big bottom frame) and then after a few seconds fresh to the target page.
header ('HTTP/1.1 301 Moved Permanently');
header("Location: " . $item_url);
were '$item_url' is the link to the external site.
As the top frame opens, the bottom frame opens to the affiate site and can set the cookies which are needed.
Then, after a few seconds the frame resets to the target bottom frame (with the cookies) which then work correct.
I've tried this by hard coding it in HTML however I need to do this using PHP as the external link is updated each time.
So how do I build a HTML frame page using PHP?
Top frame: My small frame with a timer (1 second)
Bottom frame:Is the '$item_url' URL (cookies get loaded)
After 1 second the whole frame redirects to '$item_url'
Many Thanks http://www.cutpriceposters.com
I am using PHP to open a new browser window to a affiate site which works well most of the time, however they are using a geo-location script which does not work well with non USA traffic. The only solution I can work out is to open a window in a frame (small top frame, big bottom frame) and then after a few seconds fresh to the target page.
header ('HTTP/1.1 301 Moved Permanently');
header("Location: " . $item_url);
were '$item_url' is the link to the external site.
As the top frame opens, the bottom frame opens to the affiate site and can set the cookies which are needed.
Then, after a few seconds the frame resets to the target bottom frame (with the cookies) which then work correct.
I've tried this by hard coding it in HTML however I need to do this using PHP as the external link is updated each time.
So how do I build a HTML frame page using PHP?
Top frame: My small frame with a timer (1 second)
Bottom frame:Is the '$item_url' URL (cookies get loaded)
After 1 second the whole frame redirects to '$item_url'
Many Thanks http://www.cutpriceposters.com