Created
September 8, 2015 22:54
-
-
Save ajspadial/cf8261d334caf3900a75 to your computer and use it in GitHub Desktop.
Simple script for downloading every picture in http://bl-labs.github.io/arcadeinterface/sample_images.html for the Brittish Library Crodwsourcing Jam
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sampleset = file_get_contents('data/sampleset.csv'); | |
$samples = explode("\n", $sampleset); | |
array_shift($samples); | |
array_walk($samples, function($s) { | |
$sampleData = explode(',', $s); | |
$namefile = $sampleData[0]; | |
$smallURL = $sampleData[4]; | |
copy($smallURL, 'data/repo/' . $namefile . '.jpg'); | |
}); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment