This is useless, You have to buy ipstack plan to use this script, If you disable the location targeting, still it requires the ipstack to show ads on publishers' websites. Ipstack charges 10.99 usd per month for it. they should have used any free service for this purpose.
ad display depends on ipstack, you have to buy a premium plan to use in this script, your API usage exceeds the monthly quota and your ads will stop showing on the publisher sites. If you have 100 publishers, which you will achieve soon if you work properly, Every page view on the publisher site generates an API usage on ipstack, Suppose every publisher on your network has 5000 daily page views, you have 50 sites, which equals 5000×50=250000, daily, in a month 250000×30= 7500000 API request for 7500000 impressions. You have to buy 99 usd plan for 2000000 api requests. every month, even more.
2. Second thing I tested is that click fraud protection doesn't work, I set 1 minute for click fraud and started clicking ads, I clicked 89 times on my own ads and it doesn't stop me from earning, I got earnings for 89 clicks in my publisher account. I had to stop because my ipstack free API limit was reached and ads stopped showing on my publisher domain.