Re: Odd request

From: Date: Sat, 12 Oct 2002 11:38:39 +0000
Subject: Re: Odd request
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-119729@lists.php.net to get a copy of this message
"Shawn McKenzie" <nospam@mckenzies.net> wrote in message news:20021012043923.26218.qmail@pb1.pair.com... > Probably a question for the php dev team, but here it goes. I want to > display an external page in an iframe and have the iframe auto sized to fit > the content without having scroll bars. I've tried javascript to no avail. > So here's my idea: > > 1. Instead of iframe: $string = > file_get_contents("http://somwhere.com"); > to load page into string and then echo $string; use javascript to detect > onclick, get href of anchor, load page into string and echo again. Works > O.K. unless there are relative paths in document. > > 2. What I want to do: $string = > file_get_contents("http://somwhere.com"); > and determine the height that this page ($string) would render in a browser. > Render iframe at determined height with src = > "http://somwhere.com". > > Any way in php to determine at what height html content will render??? If > not, should there be? Probably Not. It depends on the UA completly. eg screen res, font size, browser incompatibilty etc... Why the iframe? couldn't you just include/fopen it? -- JJ Harrison lizner2002@yahoo.com.au

« previous php.general (#119729) next »