469,290 Members | 1,887 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

Insert a webpage into a cell in a table

Hi,

I have a webpage with a table that has 4 cells (2x2). In one of those
cells, I wish to load a webpage stored on a different server
(say...www.webpage.com/abc.htm). Does HTML allow for this to be done?
I know a page can be loaded in this manner if I use frames but I do
not want to use frames for my page.

I see there are quite a few other posts asking this question but there
does not seem to be a conclusive answer.

Thank you in advance for your help!!!!
Jul 23 '05 #1
22 18985
ru******@yahoo.com (Ruslan Kogan) wrote in
news:d5**************************@posting.google.c om:
Hi,

I have a webpage with a table that has 4 cells (2x2). In one of those
cells, I wish to load a webpage stored on a different server
(say...www.webpage.com/abc.htm).
Question 1: Did they give you permission?
Does HTML allow for this to be done?
You will not be able to do it cleanly; you'd have to use an iframe.
I know a page can be loaded in this manner if I use frames but I do
not want to use frames for my page.
So that solution's out.
I see there are quite a few other posts asking this question but there
does not seem to be a conclusive answer.


You need to include the file server-side.

But first you need permission, or else you are breaking the law (in many
places).
Jul 23 '05 #2
Ruslan Kogan wrote:
I have a webpage with a table that has 4 cells (2x2). In one of those
cells, I wish to load a webpage stored on a different server
(say...www.webpage.com/abc.htm). Does HTML allow for this to be done?


If you have PHP installed on your server:

<td><? include("http://www.webpage.com/abc.htm"); ?></td>

Or if you're more of a Perl kind of guy:

print "<td>";
system("/usr/bin/HEAD 'http://www.webpage.com/abc.htm'");
print "</td>";

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #3
Toby Inkster wrote:
print "<td>";
system("/usr/bin/HEAD 'http://www.webpage.com/abc.htm'");
print "</td>";


That'll show the headers of the page, not the content. You'll want to
change "/usr/bin/HEAD" to "/usr/bin/GET". But you'll want to do some
stripping so that you only get the contents of the body element.
Jul 23 '05 #4
> > I have a webpage with a table that has 4 cells (2x2). In one of those
cells, I wish to load a webpage stored on a different server
(say...www.webpage.com/abc.htm). Does HTML allow for this to be done?


If you have PHP installed on your server:

<td><? include("http://www.webpage.com/abc.htm"); ?></td>

Or if you're more of a Perl kind of guy:

print "<td>";
system("/usr/bin/HEAD 'http://www.webpage.com/abc.htm'");
print "</td>";


It is for an ad that I will have on eBay (ebay.com.au)!! Is that Perl
or PHP??

Also, where do I place the code that you have provided?? Do I paste it
into the code for the cell or does some of it go in the header???

Thanks!
Jul 23 '05 #5
Toby Inkster wrote:
Or if you're more of a Perl kind of guy: system("/usr/bin/HEAD 'http://www.webpage.com/abc.htm'");


Eugh. That isn't Perl! That's a tiny Perl wrapper around a binary.

use strict;
use warnings;
use LWP::UserAgent;
use HTML::TreeBuilder;

# Download HTML
my $browser = LWP::UserAgent->new();
my $response = $browser->get('http://example.com/abc.htm');

# Parse HTML
my $html = HTML::TreeBuilder->new_from_content($response->content());

# Extract <body>
my $body = $html->find_by_tag_name('body');

# You should convert relative URIs to absolute, but I'm not writing that
# code at this time of the morning.

foreach my $element ($body->content_list()) {
print $element->as_HTML();
}

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #6
Leif K-Brooks wrote:
That'll show the headers of the page, not the content. You'll want to
change "/usr/bin/HEAD" to "/usr/bin/GET".
That'd be the one.
But you'll want to do some stripping so that you only get the contents
of the body element.


Assuming that abc.htm isn't already stripped of such things. (Which it may
be if Rusian has been given permission to include it.)

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #7
On 6/9/04 7:12 am, Ruslan Kogan wrote:
It is for an ad that I will have on eBay (ebay.com.au)!! Is that Perl
or PHP??

Also, where do I place the code that you have provided?? Do I paste it
into the code for the cell or does some of it go in the header???

Thanks!


You can't use server-side scripting on eBay (for obvious reasons). So you
can't use Perl or PHP, and you can't include other web pages.

If you're looking for a way to list your other auctions on your eBay pages,
then you could use Javascript to include a remote file that generates a set
of links on the fly.

Is that the sort of thing you're trying to do? If so, this might help:
<http://groups.google.co.uk/groups?se...ronanzzz%40vir
gin.net&output=gplain>

Phil

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 23 '05 #8
In article <ch*******************@news.demon.co.uk>,
David Dorward <do*****@yahoo.com> writes:
Eugh. That isn't Perl! That's a tiny Perl wrapper around a binary.
Indeedie. But yours is rather heavyweight too, parsing the entire
document in memory. Much faster to use SAX - as in the frames-
linearisation code of mod_accessibility.
use HTML::TreeBuilder;
*shudder*
# You should convert relative URIs to absolute, but I'm not writing that
# code at this time of the morning.


Useful patch at http://issues.apache.org/bugzilla/show_bug.cgi?id=28453

--
Nick Kew
Jul 23 '05 #9
David Dorward wrote:
# You should convert relative URIs to absolute, but I'm not writing that
# code at this time of the morning.


You could use:
<base href="http://example.org/dir/">

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Now Playing ~ ./cranberries_-_zombie.ogg

Jul 23 '05 #10
Toby Inkster wrote:
David Dorward wrote:
# You should convert relative URIs to absolute, but I'm not writing that
# code at this time of the morning.


You could use:
<base href="http://example.org/dir/">


No, because that would affect links on the page the external page has been
included in.

It might not be legal to put someone else's site inside yours. IANAL.

--
Matt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 23 '05 #11
this is all getting pretty confusing so i have pasted an example. I
would like to load yahoo.com in the bottom right cell....can anyone
modify the code to have this done?

thanks heaps!!!!

**********Load yahoo.com in bottom right cell*********
<html>
<head>
<title>Hello this is my Page</title>
</head>

<body>
<p>Hello this is my Page</p>

<table border=1>
<tr>
<td>...</td>
<td>...</td>
</tr>
<tr>
<td>...</td>
<td>load yahoo.com here</td>
</tr>
</table>

</body>

</html>
************************************************** ****

Please note: both sites being used are mine so there are no legality
issues.
Jul 23 '05 #12
On 6 Sep 2004 19:17:06 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:
<td>load yahoo.com here</td> Please note: both sites being used are mine so there are no legality
issues.


Let me get this straignt.

You OWN yahoo.com, and you don't have the staff to figure this out?
Jul 23 '05 #13
Neal <ne*****@yahoo.com> wrote in message news:<op**************@news.individual.net>...
On 6 Sep 2004 19:17:06 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:
<td>load yahoo.com here</td>

Please note: both sites being used are mine so there are no legality
issues.


Let me get this straignt.

You OWN yahoo.com, and you don't have the staff to figure this out?


you idiot/tool!!! (don't know which one suits you better)

just using it as an example........for all those out there concerned
about my ownership of yahoo.com, please make the bottom right cell
load "sadkjhfskjhf.com".
Jul 23 '05 #14
On 6 Sep 2004 23:40:48 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:
Neal <ne*****@yahoo.com> wrote in message
news:<op**************@news.individual.net>...
On 6 Sep 2004 19:17:06 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:
> <td>load yahoo.com here</td>

> Please note: both sites being used are mine so there are no legality
> issues.


Let me get this straignt.

You OWN yahoo.com, and you don't have the staff to figure this out?


you idiot/tool!!! (don't know which one suits you better)


I don't have the time to help people who call me those names, sorry.
Jul 23 '05 #15
Matt wrote:
Toby Inkster wrote:
David Dorward wrote:
# You should convert relative URIs to absolute, but I'm not writing that
# code at this time of the morning.


You could use:
<base href="http://example.org/dir/">


No, because that would affect links on the page the external page has been
included in.


But you have direct control of those links, so you can use absolute URLs.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #16
Neal <ne*****@yahoo.com> wrote in message news:<op**************@news.individual.net>...
On 6 Sep 2004 23:40:48 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:
Neal <ne*****@yahoo.com> wrote in message
news:<op**************@news.individual.net>...
On 6 Sep 2004 19:17:06 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:

> <td>load yahoo.com here</td> Please note: both sites being used are mine so there are no legality
> issues.

Let me get this straignt.

You OWN yahoo.com, and you don't have the staff to figure this out?


you idiot/tool!!! (don't know which one suits you better)


I don't have the time to help people who call me those names, sorry.

what?? you OWN html??? r u the only person with the knowledge on how
this is done??? well if you OWN html....congrats!
Jul 23 '05 #17
ru******@yahoo.com (Ruslan Kogan) wrote in
news:d5**************************@posting.google.c om:
Neal <ne*****@yahoo.com> wrote in message
news:<op**************@news.individual.net>...
On 6 Sep 2004 23:40:48 -0700, Ruslan Kogan <ru******@yahoo.com>
wrote:
> Neal <ne*****@yahoo.com> wrote in message
> news:<op**************@news.individual.net>...
>> On 6 Sep 2004 19:17:06 -0700, Ruslan Kogan <ru******@yahoo.com>
>> wrote:
>>
>> > <td>load yahoo.com here</td>

>> > Please note: both sites being used are mine so there are no
>> > legality issues.
>>
>> Let me get this straignt.
>>
>> You OWN yahoo.com, and you don't have the staff to figure this
>> out?
>
> you idiot/tool!!! (don't know which one suits you better)


I don't have the time to help people who call me those names, sorry.

what?? you OWN html??? r u the only person with the knowledge on how
this is done??? well if you OWN html....congrats!


huh??? i don't understand the analogy!!! didnt u notice that u simply
stated u wished to load the contents of yahoo.com??? did u know thats how
it seemed??? r u insensitive on purpose?? could u please not jump on
peoples throats???
Jul 23 '05 #18
On 10 Sep 2004 04:28:50 GMT, Sam Hughes <hu****@rpi.edu> wrote:
ru******@yahoo.com (Ruslan Kogan) wrote in
news:d5**************************@posting.google.c om:

what?? you OWN html??? r u the only person with the knowledge on how
this is done??? well if you OWN html....congrats!


huh??? i don't understand the analogy!!! didnt u notice that u simply
stated u wished to load the contents of yahoo.com??? did u know thats how
it seemed??? r u insensitive on purpose?? could u please not jump on
peoples throats???

would u guys stop using the letter u for you and use some capital letters
cuz yer annoying the piss out of me
Jul 23 '05 #19
Neal <ne*****@yahoo.com> wrote in
news:op**************@news.individual.net:
On 10 Sep 2004 04:28:50 GMT, Sam Hughes <hu****@rpi.edu> wrote:
ru******@yahoo.com (Ruslan Kogan) wrote in
news:d5**************************@posting.google.c om:

what?? you OWN html??? r u the only person with the knowledge on how
this is done??? well if you OWN html....congrats!


huh??? i don't understand the analogy!!! didnt u notice that u simply
stated u wished to load the contents of yahoo.com??? did u know thats
how it seemed??? r u insensitive on purpose?? could u please not jump
on peoples throats???

would u guys stop using the letter u for you and use some capital
letters cuz yer annoying the piss out of me


My reasons for using 'u' and question marks in triplicate must have been
too obscure. Never mind.
Jul 23 '05 #20
On 10 Sep 2004 06:31:42 GMT, Sam Hughes <hu****@rpi.edu> wrote:
what?? you OWN html??? r u the only person with the knowledge on how
this is done??? well if you OWN html....congrats!

huh??? i don't understand the analogy!!! didnt u notice that u simply
stated u wished to load the contents of yahoo.com??? did u know thats
how it seemed??? r u insensitive on purpose?? could u please not jump
on peoples throats???

would u guys stop using the letter u for you and use some capital
letters cuz yer annoying the piss out of me


My reasons for using 'u' and question marks in triplicate must have been
too obscure. Never mind.


nah i got it u r 2 stoopid 2 no im playing along :)
Jul 23 '05 #21
Neal <ne*****@yahoo.com> wrote in news:opsd4a90hs6v6656
@news.individual.net:
nah i got it u r 2 stoopid 2 no im playing along :)


bah u win!!! :)

nice 1 on the 'stoopid'
Jul 23 '05 #22
On 11 Sep 2004 01:31:49 GMT, Sam Hughes <hu****@rpi.edu> wrote:
Neal <ne*****@yahoo.com> wrote in news:opsd4a90hs6v6656
@news.individual.net:
nah i got it u r 2 stoopid 2 no im playing along :)


bah u win!!! :)

nice 1 on the 'stoopid'

LOLAFDACMYO!!!!11!11one11!1
Jul 23 '05 #23

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Sandy Bremmer | last post: by
reply views Thread by crypto_solid via AccessMonster.com | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.