Skip to content

Instantly share code, notes, and snippets.

@BANKA2017
Created September 17, 2018 07:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BANKA2017/9bae36d26deb92171880b80f5b975027 to your computer and use it in GitHub Desktop.
Save BANKA2017/9bae36d26deb92171880b80f5b975027 to your computer and use it in GitHub Desktop.
get sticker pack from line store
<?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