$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
Re: Frames alternative?
am 23.08.2007 13:47:37 von Bernhard Sturm
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
Re: Frames alternative?
am 23.08.2007 13:58:18 von UKuser
On 23 Aug, 12:47, Bernhard Sturm 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
Re: Frames alternative?
am 23.08.2007 14:23:37 von Martin Jay
On Thu, 23 Aug 2007 04:58:18 -0700, UKuser
wrote:
>On 23 Aug, 12:47, Bernhard Sturm 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?
$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
Re: Frames alternative?
am 23.08.2007 15:10:14 von UKuser
On 23 Aug, 13:23, Martin Jay wrote:
> On Thu, 23 Aug 2007 04:58:18 -0700, UKuser
> wrote:
>
> >On 23 Aug, 12:47, Bernhard Sturm 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?
>
>
>
> $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
Re: Frames alternative?
am 23.08.2007 15:33:21 von lws4art
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 *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=cross-site+cookie&btnG= Google+Search
cross-site cookie - Google Search
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Re: Frames alternative?
am 23.08.2007 16:05:59 von a.nony.mous
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
Re: Frames alternative?
am 23.08.2007 16:06:12 von UKuser
On 23 Aug, 14:33, "Jonathan N. Little" 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 *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=cross-site+cookie&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
Re: Frames alternative?
am 23.08.2007 16:19:41 von UKuser
On 23 Aug, 15:05, "Beauregard T. Shagnasty" 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