473,387 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

html page from different server

Is there a way to embed html page from different server into another
html page without using javascript ?

Dec 4 '06 #1
15 1812
de********@gmail.com wrote:
Is there a way to embed html page from different server into another
html page without using javascript ?

http://msdn.microsoft.com/workshop/a...cts/iframe.asp

---------------------------------------------------------------------------
http://www.hunlock.com -- Permanently under construction (And proud of it!)
$FA
Dec 4 '06 #2
demiourgos wrote:
Is there a way to embed html page from different server into another
html page without using javascript ?
PHP's include() function, or similar function in almost any other
server-side scripting language.

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

Dec 4 '06 #3
wrote on 04 dec 2006 in comp.lang.javascript:
Is there a way to embed html page from different server into another
html page without using javascript ?
This is off topic, isn't it?

But yes, you could use any other program language available,
like VBS in IE, or any serverside language, ASP-VBS, PHP.

Even serverside JS can do that, but you stipulated against that.

Please ask in a relevant NG.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Dec 4 '06 #4
Evertjan. wrote on 05 dec 2006 in comp.lang.javascript:
wrote on 04 dec 2006 in comp.lang.javascript:
>Is there a way to embed html page from different server into another
html page without using javascript ?

This is off topic, isn't it?

But yes, you could use any other program language available,
like VBS in IE, or any serverside language, ASP-VBS, PHP.

Even serverside JS can do that, but you stipulated against that.

Please ask in a relevant NG.
Oh yes, you can use <iframe>.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Dec 4 '06 #5
In alt.html, de********@gmail.com wrote:
Is there a way to embed html page from different server into another
html page without using javascript ?
Nobody asked the question.

Are they both your pages?

--
-bts
-This message has been tested for polonium-210 and found to be safe
Dec 5 '06 #6

de********@gmail.com wrote:
Is there a way to embed html page from different server into another
html page without using javascript ?
Frame or <iframe- client-side only.

Can't use server-side stuff or SSI if it's on a different server.

You _could_ cache a copy on the server, then use server-side
techniques, but if you knew how to do that, you'd be telling us how to
do it instead.

All of these can be legally dubious if you're doing it to someone
else's content.

Dec 5 '06 #7
Andy Dingley wrote:
Can't use server-side stuff or SSI if it's on a different server.
Can!

include("http://www.google.com/");

works nicely in PHP.

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

Dec 5 '06 #8
In article <rn************@ophelia.g5n.co.uk>,
Toby Inkster <us**********@tobyinkster.co.ukwrote:
Andy Dingley wrote:
Can't use server-side stuff or SSI if it's on a different server.

Can!

include("http://www.google.com/");

works nicely in PHP.
Not a very good idea though.

From <http://www.google.com/intl/en/terms_of_service.html>:
>You may not take the results from a Google search and reformat and
display them, or mirror the Google home page or results pages on
your Web site.
--
If you really must contact me by email, visit
http://rumkin.com/tools/compression/base64.php
and decode the following string of characters:
RW1haWw6IHBoaWxyb25hbkBibHVleW9uZGVyLmNvLnVr
Dec 5 '06 #9
Philip Ronan wrote:
In article <rn************@ophelia.g5n.co.uk>,
Toby Inkster <us**********@tobyinkster.co.ukwrote:
>Andy Dingley wrote:
>>Can't use server-side stuff or SSI if it's on a different server.
Can!

include("http://www.google.com/");

works nicely in PHP.

Not a very good idea though.

From <http://www.google.com/intl/en/terms_of_service.html>:
>>You may not take the results from a Google search and reformat and
display them, or mirror the Google home page or results pages on
your Web site.
Sure, but Toby was just show that it *can* be done not whether or not it
*should* be done. It has been mentioned in this thread grabbing content
without permission was a bad idea. With permission it is not a problem.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Dec 5 '06 #10
Jonathan N. Little wrote:
Philip Ronan wrote:
>In article <rn************@ophelia.g5n.co.uk>,
Toby Inkster <us**********@tobyinkster.co.ukwrote:
>>Andy Dingley wrote:

Can't use server-side stuff or SSI if it's on a different server.
Can!

include("http://www.google.com/");

works nicely in PHP.

Not a very good idea though.

From <http://www.google.com/intl/en/terms_of_service.html>:
>>>You may not take the results from a Google search and reformat and
display them, or mirror the Google home page or results pages on
your Web site.
Sure, but Toby was just show that it *can* be done not whether or not it
*should* be done. It has been mentioned in this thread grabbing content
without permission was a bad idea. With permission it is not a problem.
I think it's a problem as well, that the page source looks like this:

<html><head><title>blaa blaa-page</title></head><body>
<h1>Lorem ipsum dolor sit amet</h1>
<p>bit of blaa blaa blaa</p>
<html><head><title>Google</title>
<!-- lots of blaablaa here -->
</head><body>
<!-- more blaablaa here -->
</body></html>
<p>and yet some blaa blaa</p>
</body></html>

Or is it not?

Olli
Dec 5 '06 #11
Olli Mäntyranta <ol*****@gmail.comwrote:
news: Av**************@reader1.news.saunalahti.fi
Jonathan N. Little wrote:
>Philip Ronan wrote:
>>In article <rn************@ophelia.g5n.co.uk>,
Toby Inkster <us**********@tobyinkster.co.ukwrote:

Andy Dingley wrote:

Can't use server-side stuff or SSI if it's on a different server.
Can!

include("http://www.google.com/");

works nicely in PHP.

Not a very good idea though.
[snip]
I think it's a problem as well, that the page source looks like this:

<html><head><title>blaa blaa-page</title></head><body>
<h1>Lorem ipsum dolor sit amet</h1>
<p>bit of blaa blaa blaa</p>
<html><head><title>Google</title>
<!-- lots of blaablaa here -->
</head><body>
<!-- more blaablaa here -->
</body></html>
<p>and yet some blaa blaa</p>
</body></html>

Or is it not?
It does not need to be a problem.
<?
/* Get the body content of a page */
$page=file_get_contents('http://www.google.com/');
$bodycontent=preg_split("/([<]body[^>]*>|<\/body>)/", $page);
print $bodycontent[1];
?>

--
BootNic Tuesday, December 05, 2006 10:16 AM

"No man's life, liberty, or property is safe while the legislature is
in session."
*Judge Gideon J. Tucker, 1866.*
Dec 5 '06 #12

Toby Inkster wrote:
Andy Dingley wrote:
Can't use server-side stuff or SSI if it's on a different server.

Can!

include("http://www.google.com/");
works nicely in PHP.
For unusably small values of "nicely".

This technique is crap, don't ever use it on a live site. It's
symptomatic of PHP's worst feature, the attitude that if it can be
bodged on, it ought to be. Then the horde of clueless script kiddies
that represent the majority of PHP developers see the feature and use
it blindly.

Firstly, there's the rights issue (big deal).

Secondly, most of the things served by HTTP URLs are HTML pages -- i.e.
Whole pages, with <headetc, not just the small fragment you want to
embed.

Thirdly it's unreliable. What happens if the source server for this
include is down (or just slow)? The whole page dies, because there's no
caching mechanism.

Fouthly it's as slow as a dog because it involves extra round tripping
between servers.

Most importantly though, it's as unsafe and insecure as a Macclesfield
knocking shop with a MySpace website. PHP doesn't include HTML by this
route, it includes _PHP_scripts_. That's right - slurp up a random
fragment of PHP from feck knows where, then go and execute the damned
thing! Maybe you expect to just be pulling in some plain old HTML by
this route, but if someone sticks nasty-intentioned PHP into there,
you're already bending right over, lubed and ready.

_REALLY_ don't ever even think about using this total abomination. It's
crap like this that is the reason I won't give PHP house room.

Dec 5 '06 #13
Andy Dingley wrote:
For unusably small values of "nicely".
OK, so it's unlikely you'd want to do exactly what I posted as an example.
More likely, you'd have PHP download a copy of the file, cache it, and
probably parse and reformat it. That however, doesn't work so nicely in a
three-line post.

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

Dec 5 '06 #14

Toby Inkster wrote:
Andy Dingley wrote:
For unusably small values of "nicely".

OK, so it's unlikely you'd want to do exactly what I posted as an example.
I wouldn't ever want to do anything that involved PHP's include() and a
URL
More likely, you'd have PHP download a copy of the file, cache it, and
probably parse and reformat it.
Yes, that's the level of trouble you'd have to go to. It wouldn't use
include() anywhere.

For almost all rational purposes involving content aggregation across
servers, then RSS is the sensible way to go.

Dec 6 '06 #15
Olli Mäntyranta wrote:
Jonathan N. Little wrote:
>Philip Ronan wrote:
>>In article <rn************@ophelia.g5n.co.uk>,
Toby Inkster <us**********@tobyinkster.co.ukwrote:

Andy Dingley wrote:

Can't use server-side stuff or SSI if it's on a different server.
Can!

include("http://www.google.com/");

works nicely in PHP.

[...]
[...]

I think it's a problem as well, that the page source looks like this:

<html><head><title>blaa blaa-page</title></head><body>
<h1>Lorem ipsum dolor sit amet</h1>
<p>bit of blaa blaa blaa</p>
<html><head><title>Google</title>
<!-- lots of blaablaa here -->
</head><body>
<!-- more blaablaa here -->
</body></html>
<p>and yet some blaa blaa</p>
</body></html>

Or is it not?
You can (use Regular Expressions to) filter out the body element's content
of the included document.
PointedEars
--
The German psychs, the German authorities, the German secret service agents
are [...] fanatics, they are insane and known of persecuting innocent people
and Scientologists. -- "The only real Barbara Schwarz", dsw.scientology,
<16**************************@posting.google.com >
Dec 9 '06 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris Kennedy | last post by:
I am fine designing .net apps by myself. For my company to start utilising ..net properly we need systems and approaches in place where we can integrate web designers designing the frontend and web...
6
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp;...
1
by: Al Wilkerson | last post by:
Hey, I have a Web Form with a drop down list, textbox, and search button. When click the search button an SQL server database is queried fordata. Once I have the data in a dataset I use the...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
82
by: Eric Lindsay | last post by:
I have been trying to get a better understanding of simple HTML, but I am finding conflicting information is very common. Not only that, even in what seemed elementary and without any possibility...
10
by: Eric Lindsay | last post by:
This may be too far off topic, however I was looking at this page http://www.hixie.ch/advocacy/xhtml about XHTML problems by Ian Hickson. It is served as text/plain, according to Firefox...
10
by: Barry L. Camp | last post by:
Hi all... hope someone can help out. Not a unique situation, but my search for a solution has not yielded what I need yet. I'm trying to come up with a regular expression for a...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
33
by: MC | last post by:
Hey, I have a need to get HTML from a client back to a server to do server processing. I would like the HTML and form data both. Is there a simple way to capture that? I do not want to submit...
42
by: Santander | last post by:
how to decode HTML pages encoded like this: http://www.long2consulting.com/seeinaction2008/Simplicity_Beach_table/index.htm Is there script that will do this automatically and generate normal fully...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.