Skip to content

Tag: ip

Ban IP Ranges php

I found this code: This code is completely functional and working, the thing is that I want to add more than one range so I did this: But this one didn’t work , it goes throught the two parts of the conditional and it shows : Any way of fixxing it? Answer Use a flag, toggle it when you find

Challenge to uniquely identify a computer from any of its browsers

In an HTML5 web app, I’m building a feature that relies on client-to-client communication (with pusher). It’s made of PHP on the server-side and Javascript with Vue on the client side. The typical scenario is: a window popup is opened, and from there it communicates directly with some other windows opened into any another browser on the same computer. Let’s

PHP Echo ipv4 and Ipv6

How Do I make it so my script echo’s both IPv4 And IPv6, but if 1 of them is not detected it will say ”Not Detected”. Answer There’s only one address, IPv4 or IPv6. You can detect using the filter extension

Get Ip From Client Apache and Php

Want to ask, but maybe this question is a duplicate. I’m sorry that all the answers to the other questions didn’t work in my case. Question I have a server with apache as webserver running php+7.4 with default settings and certbot as SSL with public IP, I want to retrieve the IP of the client that opens my website,

PHP: getting user’s IP address using lighttpd

I tried this function but this always return the host/website’s IP address instead of the user’s IP any idea why and how to fix it? the website is not hosted on localhost and I’m using lighttpd to host the website Answer lighttpd provides the remote address in the CGI environment variable REMOTE_ADDR. lighttpd does not set HTTP_CLIENT_IP unless the request

PHP architecture – Individual cron job per user

I’m building a website in PHP and need an API to be checked on a regular basis for EACH USER individually. In a nutshell it’s a SaaS to steer a user account on another website with additional/automated options. A web based bot if you want. So basically, I need to dynamically create a new cron job with its individual interval

How do you access the public Spamhaus DBL service?

The Spamhaus DBL is intended to be used to find domains that have poor reputations of sending spam. According to their documentation you should be able to test that it is working by looking up the host or dig response for ‘’ and it should respond with ‘ IN A’. However this is what I get: The host results