Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Frames alternative?

Reply
Thread Tools

Frames alternative?

 
 
UKuser
Guest
Posts: n/a
 
      08-23-2007
Is there a way that I can load a page within a page and still have
cookies/javascript etc working?

This is my code thus far:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;
charset=windows-1250" />
<link rel="stylesheet" href="css/bbb1.css" type="text/css"
title="Main style" />
<link rel="stylesheet" href="css/top-content.css" type="text/css"
title="Main style" />
<title>Website</title>
</head>
<body>

<div style="background-color:#02A59E;display:block;float:left;width:
100%;height:43px;">
<p>
<span style="float:left;padding-left:20px"><img src="images/link-
logo.jpg"></span>

<h1 style="float:left;margin-left:15px;line-height:43px;vertical-
align:bottom">
<a href="javascript: self.close ()" target="_top"
style="color:white;font-size:14pt">Return to our website</a>
</h1>

<span style="float:right;width:10%;line-height:43px;vertical-
align:bottom;color:white">
<a href="http://<?php print"$site";?>" style="color:white">Remove
Frame</a>
</span>
</p>
</div>

<div style="margin-top:20px;clear:both">
</div>
</body>
</html>
<?php
$content = file_get_contents("http://$site"); // where site is a
www.anyname.com

echo $content;
?>

This will load the page, but as text and/or disable any cookies or
javascript and thus showing the user any external error pages asking
for cookies to be enabled.

I've tried standard iframes and frames but in IE these have cookies/
javascript disabled. I'm trying to find a PHP 100% equivilent to
frames.

Thanks

A

 
Reply With Quote
 
 
 
 
Bernhard Sturm
Guest
Posts: n/a
 
      08-23-2007
UKuser wrote:

>
> I've tried standard iframes and frames but in IE these have cookies/
> javascript disabled. I'm trying to find a PHP 100% equivilent to
> frames.
>

forget the concept 'frames' use includes instead. For php use this in
order to load an external file into your main file:


require_once("myexternalfile.php");


HTH
bernhard


--
www.daszeichen.ch
remove nixspam to reply
 
Reply With Quote
 
 
 
 
UKuser
Guest
Posts: n/a
 
      08-23-2007
On 23 Aug, 12:47, Bernhard Sturm <(E-Mail Removed)> wrote:
> UKuser wrote:
>
> > I've tried standard iframes and frames but in IE these have cookies/
> > javascript disabled. I'm trying to find a PHP 100% equivilent to
> > frames.

>
> forget the concept 'frames' use includes instead. For php use this in
> order to load an external file into your main file:
>
> require_once("myexternalfile.php");
>
> HTH
> bernhard
>
> --www.daszeichen.ch
> remove nixspam to reply


Hi,

If I do that all the links from the external site point to my website,
i.e.

mysite-root/a-page-I-don't-have.html

I tried this, but the images and links wouldnt work.

Thanks

A

 
Reply With Quote
 
Martin Jay
Guest
Posts: n/a
 
      08-23-2007
On Thu, 23 Aug 2007 04:58:18 -0700, UKuser <(E-Mail Removed)>
wrote:
>On 23 Aug, 12:47, Bernhard Sturm <(E-Mail Removed)> wrote:
>> UKuser wrote:
>> forget the concept 'frames' use includes instead. For php use this in
>> order to load an external file into your main file:
>>
>> require_once("myexternalfile.php");
>>
>> HTH
>> bernhard


>If I do that all the links from the external site point to my website,
>i.e.
>
>mysite-root/a-page-I-don't-have.html
>
>I tried this, but the images and links wouldnt work.


Have you considered parsing the HTML to correct these problems?

<?php

$content = file_get_contents("http://$site"); // where site is a
www.anyname.com

/* a bit of code here to correct links to pages and images */

echo $content;
?>
--
Martin Jay
 
Reply With Quote
 
UKuser
Guest
Posts: n/a
 
      08-23-2007
On 23 Aug, 13:23, Martin Jay <(E-Mail Removed)> wrote:
> On Thu, 23 Aug 2007 04:58:18 -0700, UKuser <(E-Mail Removed)>
> wrote:
>
> >On 23 Aug, 12:47, Bernhard Sturm <(E-Mail Removed)> wrote:
> >> UKuser wrote:
> >> forget the concept 'frames' use includes instead. For php use this in
> >> order to load an external file into your main file:

>
> >> require_once("myexternalfile.php");

>
> >> HTH
> >> bernhard

> >If I do that all the links from the external site point to my website,
> >i.e.

>
> >mysite-root/a-page-I-don't-have.html

>
> >I tried this, but the images and links wouldnt work.

>
> Have you considered parsing the HTML to correct these problems?
>
> <?php
>
> $content = file_get_contents("http://$site"); // where site is awww.anyname.com
>
> /* a bit of code here to correct links to pages and images */
>
> echo $content;
> ?>
> --
> Martin Jay


I did play with that, but the other problem was duplicating the HTML
start/body/head tags which needed to be stripped out as well. My
problem is I have a directory where I want to open up websites within
it, but display our header on top. One of our listees has cookies
running on their front page, and either iframes or regular frames
didnt like having them.

If theres an alternative solution, I'm open to ideas.

A

 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      08-23-2007
UKuser wrote:

> I did play with that, but the other problem was duplicating the HTML
> start/body/head tags which needed to be stripped out as well.


and have <?php echo $content; ?> *before* the pages' closing body and
html tags.

> My
> problem is I have a directory where I want to open up websites within
> it, but display our header on top. One of our listees has cookies
> running on their front page, and either iframes or regular frames
> didnt like having them.
>
> If theres an alternative solution, I'm open to ideas.


You have your troubles well set before you, cross-site cookies is a
security hole that browsers makers have been plugging for years. Read up
and see why you are having trouble...

http://www.google.com/search?hl=en&q...=Google+Search
cross-site cookie - Google Search

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      08-23-2007
UKuser wrote:

> My problem is I have a directory where I want to open up websites
> within it, but display our header on top.


Begs the question: do you have permission from these websites to
display their pages under your banner?

> One of our listees has cookies running on their front page, and either
> iframes or regular frames didnt like having them.


"listees" might imply they have 'signed up' to have their content
scraped by you ... is this the case?

--
-bts
-Motorcycles defy gravity; cars just suck
 
Reply With Quote
 
UKuser
Guest
Posts: n/a
 
      08-23-2007
On 23 Aug, 14:33, "Jonathan N. Little" <(E-Mail Removed)> wrote:
> UKuser wrote:
> > I did play with that, but the other problem was duplicating the HTML
> > start/body/head tags which needed to be stripped out as well.

>
> and have <?php echo $content; ?> *before* the pages' closing body and
> html tags.
>
> > My
> > problem is I have a directory where I want to open up websites within
> > it, but display our header on top. One of our listees has cookies
> > running on their front page, and either iframes or regular frames
> > didnt like having them.

>
> > If theres an alternative solution, I'm open to ideas.

>
> You have your troubles well set before you, cross-site cookies is a
> security hole that browsers makers have been plugging for years. Read up
> and see why you are having trouble...
>
> http://www.google.com/search?hl=en&q...btnG=Google+Se...
> cross-site cookie - Google Search
>
> --
> Take care,
>
> Jonathan
> -------------------
> LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com


Ah - I've heard about these issues but didnt realise this is how it
materialised. Looks like we may just have to cope.

Thanks

A

 
Reply With Quote
 
UKuser
Guest
Posts: n/a
 
      08-23-2007
On 23 Aug, 15:05, "Beauregard T. Shagnasty"
<(E-Mail Removed)> wrote:
> UKuser wrote:
> > My problem is I have a directory where I want to open up websites
> > within it, but display our header on top.

>
> Begs the question: do you have permission from these websites to
> display their pages under your banner?
>
> > One of our listees has cookies running on their front page, and either
> > iframes or regular frames didnt like having them.

>
> "listees" might imply they have 'signed up' to have their content
> scraped by you ... is this the case?
>
> --
> -bts
> -Motorcycles defy gravity; cars just suck


yes we have their permission - it was the listee who highlighted their
website link didnt appear to be working

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
having a problem with scrolling frames as if no frames surfunbear@yahoo.com HTML 0 03-08-2006 09:54 PM
Frames and borders around specific frames meyousikmann@yahoo.com HTML 1 02-10-2006 11:12 PM
Frames or not Frames... Ale HTML 17 08-05-2005 12:10 AM
Link needed to go from a non-frames page to a Frames page, and load a particular frame. How? - Newbe Philip HTML 3 06-28-2004 03:06 PM
From Frames to no frames? Powerslave2112 HTML 2 01-20-2004 10:30 PM



Advertisments