Possible Duplicate:
Can Javascript read the source of any web page?
I want to download a file using javascript and parse it. I need a function like php's file_get_contents()
. I looked for it, but I couldn't find anything.
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.
PS: Sorry, but the question was really a duplicate (I didn't know that) and the solution provided here perfectly suits this problem.