Blocking east european countries from form
Permalink
Hey guys. I wan't to block all east european countries from submitting to a form. How do i do this? It's a specific danish/northern product, so people from east europe submitting to the form, isn't needed :)
//Anders J.
//Anders J.
Hi!
Our Language Manager add-on offers a built-in framework for detecting users' countries with their IP addresses:
http://www.concrete5.org/marketplace/addons/language-manager/...
All you need to provide for the add-on is a CSV list of the IP-country mappings you can find for example here:
http://www.wipmania.com/en/base/...
Just if you use their mappings, just please see their licence terms of which one is "- may not be also used to develop derivative products for sale.". This is also the reason why we didn't want to include any mapping database straight into the product.
With that you could build this functionality although it isn't 100% fully "click-and-install" solution. We can also build it for you for a fee if you don't want to do the coding part yourself.
The framework is quite easy to use, you just make one function call and it will give you the two-letter country code (e.g. EE) that represents the remote user's IP address.
Antti / Mainio
Our Language Manager add-on offers a built-in framework for detecting users' countries with their IP addresses:
http://www.concrete5.org/marketplace/addons/language-manager/...
All you need to provide for the add-on is a CSV list of the IP-country mappings you can find for example here:
http://www.wipmania.com/en/base/...
Just if you use their mappings, just please see their licence terms of which one is "- may not be also used to develop derivative products for sale.". This is also the reason why we didn't want to include any mapping database straight into the product.
With that you could build this functionality although it isn't 100% fully "click-and-install" solution. We can also build it for you for a fee if you don't want to do the coding part yourself.
The framework is quite easy to use, you just make one function call and it will give you the two-letter country code (e.g. EE) that represents the remote user's IP address.
Antti / Mainio
I have no money to use on the project :( Unfortunately. Sounds like a good solution though
//Anders J.
//Anders J.
Ok, you can also implement such blocking yourself. E.g. add the IP ranges you need to block into an array and check whether the user's IP is in that list.
There's also built-in IP-blocking system in concrete5 but that doesn't really allow to add any IP ranges if you don't want to block the entire IP-address space, e.g. 123.123.123.*
There's also built-in IP-blocking system in concrete5 but that doesn't really allow to add any IP ranges if you don't want to block the entire IP-address space, e.g. 123.123.123.*
//Anders J.