Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save azizultex/cac5648952466dbf7244d5961304eb50 to your computer and use it in GitHub Desktop.

Select an option

Save azizultex/cac5648952466dbf7244d5961304eb50 to your computer and use it in GitHub Desktop.
Download or fetch remote image files from base link and file names file_get_contents file_put_contents
<?php
return [
"1-big.jpg",
"1_01.gif",
"1_02.gif",
"1_04.gif",
"1_05.gif",
"1_07.gif",
"1_09.gif",
"1_11.gif",
"2-big.jpg",
"3-big.jpg",
"4-big.jpg",
"5-big.jpg",
"1041_1.jpg",
"1041_2.jpg",
"1041_3.jpg",
"1041_4.jpg",
];
@azizultex
Copy link
Copy Markdown
Author

azizultex commented Oct 13, 2018

In order to collect an array of images file name, you can follow the screenshot below or use curl or wp_remote_get in WordPress. Put all the images names in allProductImages.php file.

screenshot from 2018-10-13 12-07-16

Here are downloaded files:
screenshot from 2018-10-13 12-12-16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment