hi
This is how I stop spamer create account in my web site, I hope this can help you.

1. This solution apply for Drupal 7.x. Try to find similar modules by yourself if you use 6.x or 8.x

2. List of module you need: Views, Registration codes. With these modules, I think you already know what to do next... :)

3. Try create a list of Code like image below:
Code List

4. Create a views like this, make it have block display
Views-Code

5. Make Registration codes block under Main page content block, remember make: Only the listed pages is user/register
Block Config

6. Then you have a register page like this:
Reg-Page

Everytime your user create an account, the list will in-active current code and show another one