Does anyone know of any API key generator script/class for PHP? The class should have method generate, that would generate a key and isValid() method, to check if the key is
GUID would work but is not cryptographically secure.
Server answers use md5 or sha1 hashing methods on microtime() or mt_rand.
Hashing a uniqid, uuid or timestamp would not necessarily create unique results! Actually hashing increases the chance of collisions so I would strongly advise against this.