Guest User

Untitled

a guest
Jan 22nd, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. // Make a new RegisteredKey instance.
  2. $regKey = new RegisteredKey(hidden);
  3. // Add the vCode to keyID 1156.
  4. $regKey->vCode = 'hidden';
  5. // Add the API Mask to keyID 1156.
  6. $regKey->activeAPIMask = hidden;
  7. // Activate the API key.
  8. $regKey->isActive = 1;
  9. // Save the new API Key into the database.
  10. if ($regKey->store()) {
  11.   print 'Registered new API Key: ' . $regKey->keyID . ' to the database.' . PHP_EOL;
  12. } else {
  13.   print "API Key couldn't be added!" . PHP_EOL;
  14. }
  15. // Release everything.
  16. $regKey = NULL;
  17. unset($regKey);
Advertisement
Add Comment
Please, Sign In to add comment