Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2008
    Location
    Vista, CA
    Posts
    59
    Thanks
    3
    Thanked 0 Times in 0 Posts

    saving source code of another site to a variable

    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?

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,080
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    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.

  • #3
    New Coder
    Join Date
    Jun 2008
    Location
    Vista, CA
    Posts
    59
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I have seen other sites do similar things, what code did they use?

  • #4
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts
    use java or php, that is, server side languages.

  • #5
    New Coder
    Join Date
    Jun 2008
    Location
    Vista, CA
    Posts
    59
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •