You are here

function sharethis_create_publisher_key in ShareThis 8.2

Same name and namespace in other branches
  1. 7.2 sharethis.install \sharethis_create_publisher_key()

Creates a publisher key for use with the ShareThis API.

File

./sharethis.install, line 20
This file holds the install information for the ShareThis Module.

Code

function sharethis_create_publisher_key() {
  $pubkey = "dr-";
  $pubkey .= dechex(mt_rand(0, 0xffff));
  $pubkey .= dechex(mt_rand(0, 0xffff)) . "-";
  $pubkey .= dechex(mt_rand(0, 0xffff)) . "-";
  $pubkey .= dechex(mt_rand(0, 0xffff)) . "-";
  $pubkey .= dechex(mt_rand(0, 0xffff)) . "-";
  $pubkey .= dechex(mt_rand(0, 0xffff));
  $pubkey .= dechex(mt_rand(0, 0xffff));
  $pubkey .= dechex(mt_rand(0, 0xffff));
  return $pubkey;
}