HighDots Forums  

html page from different server

Javascript JavaScript language (comp.lang.javascript)


Discuss html page from different server in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
demiourgos@gmail.com
 
Posts: n/a

Default html page from different server - 12-04-2006 , 04:38 PM






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


Reply With Quote
  #2  
Old   
pcx99
 
Posts: n/a

Default Re: html page from different server - 12-04-2006 , 04:40 PM






demiourgos (AT) gmail (DOT) com wrote:
Quote:
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


Reply With Quote
  #3  
Old   
Evertjan.
 
Posts: n/a

Default Re: html page from different server - 12-04-2006 , 06:10 PM



wrote on 04 dec 2006 in comp.lang.javascript:
Quote:
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)


Reply With Quote
  #4  
Old   
Evertjan.
 
Posts: n/a

Default Re: html page from different server - 12-04-2006 , 06:12 PM



Evertjan. wrote on 05 dec 2006 in comp.lang.javascript:

Quote:
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)


Reply With Quote
  #5  
Old   
Andy Dingley
 
Posts: n/a

Default Re: html page from different server - 12-04-2006 , 08:04 PM




demiourgos (AT) gmail (DOT) com wrote:
Quote:
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.



Reply With Quote
  #6  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: html page from different server - 12-05-2006 , 08:55 AM



Philip Ronan wrote:
Quote:
In article <rnrf44-8nm.ln1 (AT) ophelia (DOT) g5n.co.uk>,
Toby Inkster <usenet200611 (AT) tobyinkster (DOT) co.uk> 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.

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


Reply With Quote
  #7  
Old   
Andy Dingley
 
Posts: n/a

Default Re: html page from different server - 12-05-2006 , 11:42 AM




Toby Inkster wrote:

Quote:
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 <head> etc, 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.



Reply With Quote
  #8  
Old   
Andy Dingley
 
Posts: n/a

Default Re: html page from different server - 12-05-2006 , 07:34 PM




Toby Inkster wrote:
Quote:
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

Quote:
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.



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.