Created
September 17, 2018 07:18
-
-
Save BANKA2017/9bae36d26deb92171880b80f5b975027 to your computer and use it in GitHub Desktop.
get sticker pack from line store
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 | |
$b = 0;//stickerpack id | |
$a = file_get_contents('https://store.line.me/stickershop/product/' . $b); | |
preg_match_all('/https:\/\/stickershop.line-scdn.net\/stickershop\/v1\/sticker\/([1-9][0-9]*)\/ANDROID\/sticker.png/',$a,$d); | |
$e = count($d[1]); | |
if(!file_exists(dirname(__FILE__) . '/' . $b . '/')){ | |
mkdir(dirname(__FILE__) . '/' . $b . '/'); | |
} | |
for($x=0;$x<$e;$x++) { | |
file_put_contents(dirname(__FILE__) . '/' . $b . '/' . $d[1][$x] . '.png',file_get_contents($d[0][$x]),LOCK_EX); | |
echo 'line_sticker_getter : ' . $d[1][$x] . ".png\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment