Those Internet folks just don't get it: content is valuable, but with all this hippie talk about "openness" and "collaboration" and "cooperation," they forgot to build in content rights management! For anyone that does run a website with valuable content, it's inevitable that pirates will come after your work and you'll need the best defenses to protect it.
Now Fran's website definitely has valuable content and they've been protecting it for years, only allowing known customers with fixed IPs to access it. "How," you may ask, "does their code stop the pirates?" A secret buried deep in ASP, they're now ready to share this technology with the world.
ok = 0 ip = Request.ServerVariables("REMOTE_ADDR") if ip = "xxx.xxx.xxx.xxx" or ip = "xxx.xxx.xxx.xxx" or ip = "xxx.xxx.xxx.xxx" # ... 11 total, all on one line then ok = 1 end if ip2 = Split(ip,".") ip3 = ip2(0) &"."& ip2(1) &"."& ip2(2) if ip3 = "xxx.xxx.xxx" or ip3 = "xxx.xxx.xxx" or ip3 = "xxx.xxx.xxx" # ... 95 total, all on one line then ok = 1 end if if ip3 = "xxx.xxx.xxx" or ip3 = "xxx.xxx.xxx" or ip3 = "xxx.xxx.xxx" # ... 149 total, all on one line then ok = 1 end if if ok = 1 then response.redirect "http://www.example.com/private/index.asp" else response.redirect "/index.asp?error=1" end if
Of note is the fact that /private/index.asp doesn't actually do any of the same checks this (6k) redirect does.