2011-12-01から1ヶ月間の記事一覧
macでスクリーンショットを取ると、どんどんデスクトップに溜まってしまう。 Desktopではなく、デスクトップにある screenshots フォルダに入れるように変更。保存先を変更する方法: Terminalを起動 以下のコマンドを入力 defaults write com.apple.screenc…
ホームページで紹介しているイベントから、google calendarにイベントとして登録できる仕掛けを作りたいので調べて見た。参考にしたのはこちら: http://www.google.com/googlecalendar/event_publisher_guide.html生成されたコードを解読してみると、
こんな方法もあるが、処理上でジオコードを取得したいときは $address = '東京都目黒区中目黒2-10-15'; $geocode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.urlencode($address).'&sensor=false'); $output= json_decode(…
$person = array ( 'firstname' => 'Namae', 'lastname' => 'Myouji' ); $p = (object) $person; echo $p->firstname; print_r()してみると、arrayから stdClass Object に変わっているのがわかる。
header('Location:http://hogehoge.com'); exit; としてもリダイレクトされないときは、すでに何かしらheaderが飛んでいる可能性がある。そんなときは if (headers_sent()) { print_r(headers_list()); die('cannot send location header (anymore)'); } を…
タグの直前に <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({ appId : 'YOUR-APP-ID-HERE', status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); </script> と記…
その1 $friends_info = $facebook->api('/me/friends'); print_r($friends_info); こっちが推奨。どういう結果が帰ってくるかは https://developers.facebook.com/tools/explorer から試せる。さらに、取得したいfieldも指定できる: $friends_info = $faceb…
magpierssをダウンロードしてそのまま使うと文字化けすることがある。 その対応としては、rss_fetch.incの357-359行目を if ( !defined('MAGPIE_OUTPUT_ENCODING') ) { define('MAGPIE_OUTPUT_ENCODING', 'ISO-8859-1'); } から if ( !defined('MAGPIE_OUTPU…