How to control application access using IWIpGeolocation

<< Click to Display Table of Contents >>

Navigation:  Forum >

How to control application access using IWIpGeolocation

Forum link

 


 

08-15-2022, 10:30 PM:

 

I've just published a new demo showing how to use the new IWIPGeolocation classes to control application access based on IPGeolocation.

 

It uses LITERALLY 2 lines of code + 2 units added to the uses clause.

 

You can have it both ways: block access from certain countries or grant access only to certain countries.

 

Please check it out:

 

https://github.com/Atozed/IntraWeb/tree/...AccessDemo

 

Please notice:

 

- You *don't need* another 2 Gb library 

 

- You *don't need* to download and install a 2 Gb package just to get IPGeolocation

 

- You *don't need* to learn another "api" just to get this simple thing working

 

It is as simple as it can should be

 

Enjoy 

 


 

09-20-2022, 05:07 PM:

 

Hi Alexandre,

 

Where do the functions AllowAccess(),BlockAccess(), IsPrivateIP() and IsLocalHost() get their comparative information from?

 

Regrads

 

Juergen

 


 

09-22-2022, 05:45 AM:

 

IsPrivateIP() and IsLocalHost() are internal IntraWeb functions declared in IW.Common.SysTools.pas

 

AllowAccess() and BlockAccess() are simple helper methods that decide based on the supplied parameters if the access should be granted or blocked... nothing else