Skip to content

Instantly share code, notes, and snippets.

@kimuchanman
Last active October 27, 2022 07:28
Show Gist options
  • Save kimuchanman/2ffbf551461294d9154292d6d427aa75 to your computer and use it in GitHub Desktop.
Save kimuchanman/2ffbf551461294d9154292d6d427aa75 to your computer and use it in GitHub Desktop.
Chatwork の emoticon をシークレット含めすべてをダウンロードする
<?php
/**
* Run this
* `php get-emoticons.php`
*/
$files = [
"emo_smile.gif",
"emo_sad.gif",
"emo_more_smile.gif",
"emo_lucky.gif",
"emo_surprise.gif",
"emo_wink.gif",
"emo_tears.gif",
"emo_sweat.gif",
"emo_mumu.gif",
"emo_kiss.gif",
"emo_tongueout.gif",
"emo_blush.gif",
"emo_wonder.gif",
"emo_snooze.gif",
"emo_love.gif",
"emo_grin.gif",
"emo_talk.gif",
"emo_yawn.gif",
"emo_puke.gif",
"emo_ikemen.gif",
"emo_otaku.gif",
"emo_ninmari.gif",
"emo_nod.gif",
"emo_shake.gif",
"emo_wry_smile.gif",
"emo_whew.gif",
"emo_clap.gif",
"emo_bow.gif",
"emo_roger.gif",
"emo_muscle.gif",
"emo_dance.gif",
"emo_komanechi.gif",
"emo_devil.gif",
"emo_star.gif",
"emo_heart.gif",
"emo_flower.gif",
"emo_cracker.gif",
"emo_cake.gif",
"emo_coffee.gif",
"emo_beer.gif",
"emo_handshake.gif",
"emo_yes.gif",
"emo_ceo.gif",
"emo_gogo.gif"
];
$cw_base_url = 'https://assets.chatwork.com/images/emoticon2x/';
foreach ($files as $file) {
$url = $cw_base_url . $file;
$cmd = 'curl -O %s';
shell_exec(sprintf($cmd, escapeshellarg($url)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment