 <p>cUrl is a server side command. It will just read the result, that is html/js code in your case but will not execute it. To solve your problem( you want to grab and save an image) use instead gd libraries.</p>