Skip to content

Instantly share code, notes, and snippets.

View iogi's full-sized avatar
:octocat:

Ippei Ogiwara iogi

:octocat:
View GitHub Profile
<?php
require 'Services/Amazon/SQS/Queue.php';
define('AMAZON_ACCESS_KEY', your access key);
define('AMAZON_SECRET_ACCESSKEY', your secret access key);
// queueのURIを指定
define('QUEUE_URL', 'http://queue.amazonaws.com/508403871985/test-queue');
$sqs = new Services_Amazon_SQS_Queue(QUEUE_URL, AMAZON_ACCESS_KEY, AMAZON_SECRET_ACCESSKEY);
<?php
$url = "http://d.hatena.ne.jp/i_ogi/atom/blog";
$user_name = "your hatena id";
$password = "your password";
$nonce = md5(mt_rand());
$created = date(DATE_ISO8601);
$x_wsse = sprintf('UsernameToken Username="%s", PasswordDigest="%s", Nonce="%s", Created="%s"',
$user_name,