src/HSPHP/ReadSocket.php
public function authenticate($authkey)
    {
	$this->sendStr(implode(self::SEP, array('A',
		$this->encodeString($authkey)
	   )) . self:: EOL
	);
	$ret = $this->readResponse();
	if (! $ret instanceof ErrorMessage) {
	    return TRUE;
	} else {
	    throw $ret;
	}
    }
public function authenticate($authkey)
    {
	$this->sendStr(implode(self::SEP, array('A',
		$this->encodeString($authkey)
	   )) . self:: EOL
	);
	$ret = $this->readResponse();
	if (! $ret instanceof ErrorMessage) {
	    return TRUE;
	} else {
	    throw $ret;
	}
    }
Authenticate a connection

@param string $authkey

@return ErrorMessage | boolean