Skip to content

Make a "What is my IP" website that works with both IPv4 and IPv6 addresses. Require a little bit of configuration to get it working. Backend (for getting IP) is made in pure PHP. And the frontend webpage is made with native JavaScript and HTML.

License

Notifications You must be signed in to change notification settings

Bastiaantjuhh/what-is-my-ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

what-is-my-ip

Make a "What is my IP" website that works with both IPv4 and IPv6 addresses. Require a little bit of configuration to get it working. Backend (for getting IP) is made in pure PHP. And the frontend webpage is made with native JavaScript and HTML.

Table of content

Features

  • View IPv4 and IPv6 Address.
  • Background images are random chosen from Unsplash.

Screenshots

Screenshot

Installation

Setup DNS

You need to configure two types of DNS records. One with a IPv4 only and you need one with a IPv6 only. Upload the backend directory to both of the subdomains.

Record Type Value
v4 A IPv4 Address
v6 AAAA IPv6 Address

Configure script

Edit /web/assets/js/ip.js

// Endpoints
const endpointIPv4 = "https://v4.your-domain.com/json.php";
const endpointIPv6 = "https://v6.your-domain.com/json.php";

Repository summary

Description Status
License GitHub
Commits GitHub commit activity
Language GitHub top language
Open issues GitHub issues
Closed issues GitHub closed issues
Pull requests GitHub pull requests
Closed pull requests GitHub closed pull requests
Repo Size GitHub repo size

License

This project is licensed under the MIT License. You are encouraged to embed the project into your other projects, as long as the license permits.

MIT License

Copyright (c) 2022 Bastiaan de Hart

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Make a "What is my IP" website that works with both IPv4 and IPv6 addresses. Require a little bit of configuration to get it working. Backend (for getting IP) is made in pure PHP. And the frontend webpage is made with native JavaScript and HTML.

Topics

Resources

License

Stars

Watchers

Forks