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
Using PHP to build HTML frames
Moderator: General Moderators
Re: Using PHP to build HTML frames
You know, you can just embed PHP in the hardcoded HTML file.
Re: Using PHP to build HTML frames
Most of the site is built using HTML in PHP and PHP in HTML. There is over 500,000 wall posters items for sale on the site using only 4 HTML pages and XML data feeds. I need to create HTML frames on the fly.... Or would it be possable using layers???
Thanks
Thanks
Re: Using PHP to build HTML frames
Why not just target="_blank" on your link, and open a regular HTML page that you write in the new window with an HTTP redirect to their page?
Code: Select all
<meta http-equiv="Refresh" content="10; URL=http://example.com">