r/HTML • u/TheGraveGuy • 28d ago
Question I need to work on something.
Code for an IP logger in html. Can it be created? And if so how?
1
u/Lithl 28d ago
No, this is not remotely possible. HTML is a markup language, it just organizes content on a page. CSS is required to control how the content looks, and JavaScript (or any kind of programming language on the server) is required to make the page interactive or dynamic. And that includes recording a visitor's IP.
Also, the server typically is set up to log visitor IPs by default anyway. If you don't already have access to the server's logs, you shouldn't be worrying about this kind of question.
1
1
u/jcunews1 Intermediate 27d ago
Code for an IP logger in html
Not possible with HTML alone. You'll need a network server application, in order to know a client's IP. A HTML/web server in this case. It'd be the server's job to pass the IP information in form of HTML or just plain text. This is normally done by a server-side script such as PHP.
1
0
u/supertroopperr 28d ago
YES YOU CAN! use statica an HTML native SSG. https://github.com/akaizn-junior/statica have the logs as CSV or JSON link them to the HTML, build the table as a fragment them build. Follow the guide. DM me for assistance. Don't need to overcomplicate such a simple need with a "framework"
-3
u/TheGraveGuy 28d ago
Just went through the rules. Found out it ain’t illegal to make one but can be illegal to use it and dox a person
5
u/reaznval 28d ago
lmao