/    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.


to post a comment

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.

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.



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 11.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ

legal: ({
terms: of use,
privacy: policy
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: @bahaedd,
tipped: article
amount: 1000 SATS,

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

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