/    Sign up×
Community /Pin to ProfileBookmark

How to get a webpage into a variable?

Hello here.

Is it possible to get a webpage (from the URL) and put it into a variable with JavaScript?

Any idea is very welcome!

Thank you in advance.

Fab.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51May 12.2005 — with the XMLHttpRequest object you can do it if you are pulling sites from your own domain. With other domains you will get a security warning.

The only real way of doing it without a warning is server side scripting.

Eric
Copy linkTweet thisAlerts:
@decibelMay 12.2005 — ok so in PHP, could you give i a quick example? (i didn't want to start anoooooother thread)
Copy linkTweet thisAlerts:
@fabrizioauthorMay 13.2005 — Thank you A1ien51,

actually I solve it just with the XMLHttpRequest.

Thank you again.

Fab.
×

Success!

Help @fabrizio spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 12.1,
social: @webDeveloperHQ,
});

legal: ({
terms: of use,
privacy: policy
analytics: Fullres
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: Anonymous,
tipped: article
amount: 1000 SATS,

tipper: @aldoushuxley,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 1000 SATS,
)...