title: How to download a webpage using javascript
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/680562/can-javascript-read-the-source-of-any-web-page">Can Javascript read the source of any web page?</a>  </p>
  </blockquote>
  
  
  
  <p>I want to download a file using javascript and parse it. I need a function like php's <code>file_get_contents()</code>. I looked for it, but I couldn't find anything.</p>
  
  <p>Update: Thanks for solutions, but I forgot to write that AJAX doesn't suite this problem, because I don't have any access to the remote address and have cross-domain requesting problem. I can't setup any php proxy either, because my host blocks access to fopen. I would prefer a pure javascript solution.</p>
  
  <p>PS: Sorry, but the question was really a duplicate (I didn't know that) and the solution provided <a href="https://stackoverflow.com/questions/680562/can-javascript-read-the-source-of-any-web-page">here</a> perfectly suits this problem.</p>