Created
September 7, 2012 18:54
-
-
Save will-in-wi/3668580 to your computer and use it in GitHub Desktop.
Test for iTunes Album Art 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 | |
$starting_links = array('http://a5.mzstatic.com/us/r1000/107/Music/v4/3a/1c/4b/3a1c4bff-7b99-2162-3036-54157c6924e6/0818610010094_1200x1200_300dpi.100x100-75.jpg',); | |
$timeout = 1; // In seconds | |
foreach ($starting_links as $link) { | |
$curr_size = 25; | |
while ($curr_size < 2000) { | |
$result = get_headers(str_replace('100x100', $curr_size . 'x' . $curr_size, $link)); | |
if ($result[0] === 'HTTP/1.0 404 Not Found') { | |
//print $curr_size . " didn't work\n"; | |
} else { | |
print $curr_size . " worked!!!\n"; | |
} | |
$curr_size += 25; | |
sleep($timeout); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment