Skip to content

Instantly share code, notes, and snippets.

@ttsuruoka
Created October 16, 2014 12:32
Show Gist options
  • Save ttsuruoka/32b764ecd8254aaa214c to your computer and use it in GitHub Desktop.
Save ttsuruoka/32b764ecd8254aaa214c to your computer and use it in GitHub Desktop.
チャットワークの絵文字(エモーティコン)を全部ダウンロードする
<?php
/**
* チャットワークの絵文字をダウンロードする
*
* 実行するとカレントディレクトリに画像ファイルをダウンロードします。
*
*/
$files = [
"image/emoticon/emo_smile.gif",
"image/emoticon/emo_sad.gif",
"image/emoticon/emo_more_smile.gif",
"image/emoticon/emo_lucky.gif",
"image/emoticon/emo_surprise.gif",
"image/emoticon/emo_wink.gif",
"image/emoticon/emo_tears.gif",
"image/emoticon/emo_sweat.gif",
"image/emoticon/emo_mumu.gif",
"image/emoticon/emo_kiss.gif",
"image/emoticon/emo_tongueout.gif",
"image/emoticon/emo_blush.gif",
"image/emoticon/emo_wonder.gif",
"image/emoticon/emo_snooze.gif",
"image/emoticon/emo_love.gif",
"image/emoticon/emo_grin.gif",
"image/emoticon/emo_talk.gif",
"image/emoticon/emo_yawn.gif",
"image/emoticon/emo_puke.gif",
"image/emoticon/emo_ikemen.gif",
"image/emoticon/emo_otaku.gif",
"image/emoticon/emo_ninmari.gif",
"image/emoticon/emo_nod.gif",
"image/emoticon/emo_shake.gif",
"image/emoticon/emo_wry_smile.gif",
"image/emoticon/emo_whew.gif",
"image/emoticon/emo_clap.gif",
"image/emoticon/emo_bow.gif",
"image/emoticon/emo_roger.gif",
"image/emoticon/emo_muscle.gif",
"image/emoticon/emo_dance.gif",
"image/emoticon/emo_komanechi.gif",
"image/emoticon/emo_devil.gif",
"image/emoticon/emo_star.gif",
"image/emoticon/emo_heart.gif",
"image/emoticon/emo_flower.gif",
"image/emoticon/emo_cracker.gif",
"image/emoticon/emo_cake.gif",
"image/emoticon/emo_coffee.gif",
"image/emoticon/emo_beer.gif",
"image/emoticon/emo_handshake.gif",
"image/emoticon/emo_yes.gif"
];
$cw_base_url = 'https://www.chatwork.com/';
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