Skip to content

Instantly share code, notes, and snippets.

@ritou
ritou / trans_oidc_core.txt
Last active August 29, 2015 13:56
Core翻訳の分担
わりと細かく分けました。
担当する宣言はコメント or メールでください!
URL : http://openid.net/specs/openid-connect-core-1_0.html
(1) 1 - 1.2 : ritou
(2) 1.3 - 2 : kura
(3) 3 - 3.1,1 : konfoo
(4) 3.1.2 - 3.1.2.1 : bangyy
(5) 3.1.2.2 - 3.1.2.4 : sat_toke
<?php
require('lib/YahooAbstractAPI.php');
/**
* ウォッチリストを取得するAPIのクラス
*/
class OpenWatchListApi extends YahooAbstractApi {
/**
* 1.APIのリクエストURL
<?php
// 0. phpのインクルードパスをごにょごにょするコードを追記
$path_extra = dirname(__FILE__);
$path = ini_get('include_path');
$path = $path_extra . PATH_SEPARATOR . $path;
ini_set('include_path', $path);
// 1.Include OAuth library.
require('lib/YahooOAuth.inc');
<?php
// 0. phpのインクルードパスをごにょごにょするコードを追記
$path_extra = dirname(__FILE__);
$path = ini_get('include_path');
$path = $path_extra . PATH_SEPARATOR . $path;
ini_set('include_path', $path);
// 1.Include OAuth library.
require('lib/YahooOAuth.inc');
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>2 Minute Speech</title>
<script type="text/javascript"><!--
var time=120;
var sectimer;
//window.onload = function() {
function startSpeech() {
<?php
class OAuthWRAPConfig{
const WRAP_CLIENT_ID = "dXNlcj0xNDE5NzI1MSZkPXItd2VibGlmZS5zYWt1cmEubmUuanAmcmVnPTEyNzA3NDkxNDguMTMwOA--";
const WRAP_CLIENT_SECRET = "dd5cc1e652a7d96b1972";
const WRAP_CALLBACK = "http://r-weblife.sakura.ne.jp/php-oauth-wrap-webapp-profile/";
}
class OAuthWRAPUtil{
<?php
// バイナリクロックを格納する配列
$display = array( "hour"=>array(), "min"=>array(), "sec" => array());
$display["hour"] = array_pad($display["hour"],5,"0");
$display["min"] = array_pad($display["min"],6,"0");
$display["sec"] = array_pad($display["sec"],6,"0");
// 現在時刻を0/1の配列にして、並び順を逆にしたもの
$hour = array_reverse(str_split(decbin(date('G'))));
<?php
if( isset($_REQUEST["done"]) && ($_REQUEST["done"] == "http" || $_REQUEST["done"] == "https") ){
$toSecurepage = ( $_REQUEST["done"] == "https" ) ? true : false;
if($toSecurepage){
quietredirector::redirection("https://r-weblife.sakura.ne.jp/php-quietredirection/test.php");
}else{
quietredirector::redirection("http://r-weblife.sakura.ne.jp/php-quietredirection/test.php");
}
}else{
@ritou
ritou / CustomURISchemeDemo.html
Created November 12, 2010 17:57
Custom URI Scheme Demo Launcher
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>カスタムURI立ち上げデモ - Y!メッセンジャー</title>
</head>
<body>
Y!メッセンジャーを立ち上げようとしています。
自動的に立ちあがらない場合には、<a href="ymsgr:">こちら</a>をクリックしてください。
<script language="JavaScript">
<!--
@ritou
ritou / pecl_oauth_hatena_profile.php
Created January 18, 2011 17:02
hatena OAuth Sample Consumer using Pecl OAuth Library.
<?php
/*
OAuthのPHP Extension(PECL OAuth? http://php.net/manual/ja/book.oauth.php)
を使ってはてなのユーザー情報を取得するサンプル。
*/
// エンドポイント
// RequestToken取得URLにScopeパラメータをつけておくと、しれっと処理されるっぽい。
$req_url = 'https://www.hatena.com/oauth/initiate?scope=read_public';