View Full Version : saving source code of another site to a variable

08-03-2008, 03:49 AM
I'm trying to save the source code of another site to a variable, but I have on idea on how to do it! Can I get some help?

Philip M
08-03-2008, 08:56 AM
That cannot be done.

For security reasons JavaScript cannot access anything beyond the domain of the current page. This is known as the "same origin policy" and prevents a document or script loaded from one origin from getting or setting properties of a document from a different origin.

08-03-2008, 06:24 PM
I have seen other sites do similar things, what code did they use?

08-04-2008, 12:48 AM
use java or php, that is, server side languages.

08-04-2008, 03:10 AM