Skip to content
Advertisement

Tag: ip

Send website visitor IP when accessing website

I am working on a personal project and I was wondering why not use a kind of ip logger that logs the ip of a visitor and sends it to a Discord webhook. The code works, but only locally. I tried hosting the code on Glitch but i was getting this error in the console: grab.js: index.html: Answer This answer

What’s the most performant way to do simple IP address comparisons?

I’m working in node.js, and I want to do something like the following pseudocode… Any ideas on the fastest way to do this? I’ve already checked out cidr-js, and it provides functionality for CIDR conversions but not IP address comparisons. Seems like node-ip could be a good choice. Thanks! Answer IP addresses as we know them are simply string representations

Redirect ranges of IPs in JavaScript (no .htaccess)

I’m trying to redirect anyone viewing my blog from certain IP addresses (or ranges of IP addresses) to a different page. I found something that works for individual IP addresses, but I can’t figure out how to block ranges of IP addresses – like 123.123.123.* Here’s the script: I’ve found some good advice for modifying .htaccess but I don’t have

Advertisement