Created
March 23, 2020 11:03
-
-
Save displaynone/de9f42ddb24fd55ef098dc7cb6051883 to your computer and use it in GitHub Desktop.
Download 10 images from picsum.photos with different sizes
This file contains 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 | |
for ( $i = 0; $i<10; $i++) { | |
$width = rand(600, 1200); | |
$height = rand(600, 1200); | |
file_put_contents( uniqid(rand(), true) . '.jpg', file_get_contents( 'https://picsum.photos/'.$width.'/'.$height)); | |
sleep(2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment