<pre>
<?php
require_once 'OAuth.php';

define('CONSUMER_KEY'    , 'CONSUMER_KEYを記述');
define('CONSUMER_SECRET' , 'CONSUMER_SECRETを記述');
define('REALM'           , 'devquiz');

function request($method, $url, $data = null) {

	$consumer = new OAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET);
	$signature_method = new OAuthSignatureMethod_HMAC_SHA1();

	$oauth_request = OAuthRequest::from_consumer_and_token($consumer, null, $method, $url);
	$oauth_request->set_parameter('hello', 'world');
	$oauth_request->sign_request($signature_method, $consumer, '');

	$headers = $oauth_request->to_header(REALM);
//	print_r($headers);die;
//	print_r($oauth_request->get_signature_base_string());die;

	$ch = curl_init($url);
	curl_setopt($ch, CURLOPT_HTTPHEADER, array($headers));
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, 'hello=world');
	$result = curl_exec($ch);
	if ($result === false) {
		return curl_error($ch);
	}
	curl_close($ch);
	return $result;
}
echo request('POST', 'http://gdd-2010-quiz-japan.appspot.com/oauth/CONSUMER_KEYを記述');
?>