- 麻婆豆腐には暴動が隠されている
- 松田聖子には惰性が隠されている
- キッコーマンにはコーマンが隠されている
- サンフランシスコには腐乱死が隠されている
- アリアナ・グランデには名倉が隠されている
- 向井秀徳には異臭が隠されている
- 宇都宮には鬱と飲み屋が隠されている
- カフェラテにはフェラが隠されている
- 浅井健一にはサイケと権威が隠されている
- バイキングにはばい菌が隠されている
This file contains hidden or 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 | |
// im.kayac.com 送信テスト | |
$api_url = "http://im.kayac.com/api/post/あなたのユーザ名"; | |
$password = "設定したパスワード"; | |
// $secret_key = "設定した秘密鍵"; | |
$message = "日本語メッセージテスト!\n改行あるとどうなる?"; | |
$content = http_build_query(array( |
This file contains hidden or 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 | |
$blob = getResizedImageBlob("./sample.png", 100, 200); | |
file_put_contents("sample_100x200.png", $blob); | |
/** | |
* @param string $img_path 画像ファイルパス | |
* @param string int $w_re リサイズ後の幅 | |
* @param string int $h_re リサイズ後の高さ | |
* @return string |
This file contains hidden or 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
# test.php をアクセス拒否する場合 | |
<Files "test.php"> | |
Order allow,deny | |
Deny from all | |
</Files> | |
# 先頭が _ や . で始まるファイルをアクセス拒否する場合は「Files ~ "正規表現"」で記述 | |
<Files ~ "^(_|\.)"> | |
Order allow,deny | |
Deny from all |
This file contains hidden or 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 | |
$user_id = "5168731"; | |
$screen_name = "mugng"; | |
var_dump( | |
u2s( "5168731" ), // string(5) "mugng" | |
s2u( "mugng" ) // string(7) "5168731" | |
); |
This file contains hidden or 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 | |
/** | |
フォト蔵 API 使って画像をアップロードするやつ | |
Usage: | |
$userid = "フォト蔵に登録したメールアドレス"; | |
$password = "パスワード"; | |
$Photozou = new \Photozou( $userid, $password ); | |
// パラメータ詳細は http://photozou.jp/basic/api_method_photo_add を参照 |
This file contains hidden or 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 | |
$rss = file_get_contents( "http://instagrss-mgng.rhcloud.com/parishilton" ); | |
$xml = simplexml_load_string( $rss ); | |
foreach( $xml->channel->item as $item ) { | |
print_r( array( | |
"title" => (string)$item->title, | |
"link" => (string)$item->link, | |
"description" => (string)$item->description, | |
"subject" => (string)$item->children("dc", true)->subject, |
This file contains hidden or 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 | |
// twitpic ダウンロードするやつ | |
// 使い方は $screen_name を保存したいアカウント名に変更してコンソールから以下コマンド実行 | |
// php twitpic_downloader.php | |
set_time_limit( 0 ); | |
// 設定 | |
$screen_name = "mugng"; // twitpicのアカウント名 |
This file contains hidden or 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 | |
// 接続 | |
$dns = "mongodb://localhost:27017"; | |
$Mongo = new \MongoClient( "mongodb://localhost:27017" ); | |
$table = $Mongo->selectCollection( "testdb", "table" ); | |
// user_id = mgng のデータがあれば update, なければ insert ( upsert ) | |
$where = [ 'user_id' => 'mgng' ]; | |
$set = [ | |
'$set' => [ |