Skip to content

Instantly share code, notes, and snippets.

@ngerakines
Created July 6, 2011 02:12
Show Gist options
  • Select an option

  • Save ngerakines/1066386 to your computer and use it in GitHub Desktop.

Select an option

Save ngerakines/1066386 to your computer and use it in GitHub Desktop.
<?php
$publicKey = 'public';
$privateKey = 'private';
$date = date(DATE_RFC2822);
$path = '/api/wow/character/Medivh/Korale';
$auth = 'BNET ' . $publicKey . ':' . base64_encode(hash_hmac('sha1', "GET\n{$date}\n{$path}\n", $privateKey, true));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment