load web page to variable

T

Tomek Toczyski

I have an url of a webpage.
I would like to load the content of the webpage to a variable.

Sth like this:

variable = loadwebpage( url )

How to do it?

(I have just spent more than an hour googling for a recipe - without
satisfaction)

-tt.
 
T

Thomas 'PointedEars' Lahn

Tomek said:
I have an url of a webpage.
I would like to load the content of the webpage to a variable.

Sth like this:

variable = loadwebpage( url )

How to do it?

Provided that protocol, domain and port part of the request URIs are the
same, you can use the (I)XMLHttpRequest object. Otherwise you have to use
a server-side solution, at least partially. You can work around the Same
Origin Policy with URL rewrite, or you can retrieve the resource with
server-side scripting.

Note that copyright/author's rights may be involved.

This was a FAQ.


HTH

PointedEars
 
T

Tomek Toczyski

Thomas 'PointedEars' Lahn:
Provided that protocol, domain and port part of the request URIs are the
same, you can use the (I)XMLHttpRequest object.

Yes, everything is the same.

Thank you for your hint. But I need a working recipe.
I am not an AJAX programmer and I have only basic knowledge of Javascript
and I have no time to learn it at the moment.

I need a recipe for loading a webpage to a variable...
One simple thing. I will be glad for your help.

-tt
 
T

Thomas 'PointedEars' Lahn

Tomek said:
Thomas 'PointedEars' Lahn:

Yes, everything is the same.

Thank you for your hint. But I need a working recipe.
I am not an AJAX programmer and I have only basic knowledge of Javascript
and I have no time to learn it at the moment.
I need a recipe for loading a webpage to a variable...

You are looking for a paid support forum, not this discussion group.
One simple thing. I will be glad for your help.

How much exactly?


PointedEars
 
T

Tomek Toczyski

You are looking for a paid support forum, not this discussion group.

I thought that my problem is quite common and there is a working recipe
for it. I might be wrong.
How much exactly?

zero $.

I need it for a webpage that I develop as a volunteer.
Sorry.

-tt.
 
G

Gregor Kofler

Randy Webb meinte:
Tomek Toczyski said the following on 8/13/2007 5:25 AM:

It is a common question here. So common it is answered in the group FAQ:

<URL: http://jibbering.com/faq/index.html#FAQ4_44>

Given the information by the OP: Do you think those links are helpful
*for him*?

That does not necessarily justify, that others have to work for you for
free as well.
Ignore Thomas, he might exit puberty in a few years.

Well, you sound pretty grown up...

Gregor
 
G

Gregor Kofler

Randy Webb meinte:
Actually, yes. Since the OP stated "I would like to load the content of
the webpage to a variable", the only reasonable approach to that would
be an AJAX request or to load it in an IFrame and read the innerHTML or
such of the IFrame.

I know. But to me it sounded more like "I want a ready-to-roll solution"
(i.e. copy 'n' paste); anyway, I was obviously wrong on that.

Gregor
 
T

Thomas 'PointedEars' Lahn

Tomek said:
Randy Webb:

exactly: http://jibbering.com/faq/index.html#FAQ4_38

Tkank you very much!
It is what I have been looking for.

(I didn't checked it in FAQ before because jibbering.com was unavailable
for me few hours ago)

Sigh. [psf 10.1]

,-<[email protected]>
| Provided that protocol, domain and port part of the request URIs are the
| same, you can use the (I)XMLHttpRequest object.
^^^^^^^^^^^^^^^^^
http://www.google.com/search?q=ixmlhttprequest+OR+xmlhttprequest&filter=0

When will Google finally become a school subject? [psf 6.2]


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,414
Latest member
GayleWedel

Latest Threads

Top