How to allow registration only from a certain location?

The googles suggested several ways to do this, either with PHP or jQuery.

Here’s one article I found to get you started: http://tutorialzine.com/2016/06/quick-tip-detecting-your-location-with-javascript/

Plus there is this Stackoverflow answer that might help: https://stackoverflow.com/questions/40636671/how-to-setup-the-functionality-to-get-user-location-in-browser

“Geolocation” is a good search term to use.

You’ll need to customize you registration form to enable this, but perhaps these links will help.

Good luck.