jquery - Save Images from a webpage using Javascript or PHP -


I wrote a slightly javascript application with jquery that brings an RSS feed through the Google Feed API and it's grid of images Displays as.

The code then appears:

  & lt; Ul & gt; ... & lt; Li & gt; & Lt; A class = "entry" href = "LINK_TO_BIG_IMAGE" title = "TITLE_OF_ENTRY" & gt; & Lt; Img class = "entry-img" src = "THUMB_IMG" alt = "" /> & Lt; / A & gt; & Lt; / Li & gt; ... & lt; / Ul & gt;   

What I have to do, is to be able to save the images in the folder to the server at one time. If this happens on page load then I will be happy now. Is it possible through javascript? Do you have to pay attention to some points?

Thanks in advance!

Your comment about submitting a path to a PHP script on the server will work (I like it Does not recommend, but it works).

Your php can then download images such as (untested and you need to parse the file name from $ url when you go to save the file.)

 < Code> & lt ;? Php $ image_urls = isset ($ _ POST ['image_urls'])? $ _POST ['image_urls']: null; // Assume this is an array of URLs if (Count! ($ Image_urls) // Check that our array contains exactly 1 or more URLs (die ('no URL provided');} $ Image_folder_path = '/ Home / somefolder /'; Foreign currency ($ image_paths $ index = & gt; $ url) {$ file_name = $ image_folder_path $ Index '.jpg'; // You need to parse the URL for the file name Will be required and the exact $ image = file_get_contents ($ url); // if the FOPAN rappers need extension to be enabled Awareness will you can do otherwise file_put_contents to bring cUrl file ($ file_name, $ image);}? & Gt;    

Comments