-
Notifications
You must be signed in to change notification settings - Fork 0
/
ip.html
49 lines (36 loc) · 1.11 KB
/
ip.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head>
<title>Getting Clients IP</title>
<style>
h1 {
color: green;
}
</style>
<script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
</script>
<script>
// Add "https://ipinfo.io" statement
// this will communicate with the ipify servers
// in order to retrieve the IP address
$.get("https://json.geoiplookup.io/", function(response) {
if(response.ip == '182.18.201.118'){
alert("Internal IP: " +response.ip);
window.location.replace("http://domain:8080/kajima/#/");
}
else{
alert("External IP: " +response.ip);
window.location.replace("https://dhrisportal.delsansolutions.com/kajima/#/");
}
}, "json")
// "json" shows that data will be fetched in json format
</script>
</head>
<body>
<center>
<h1>Delsan</h1>
<h3>Getting Client IP address</h3>
</center>
</body>
</html>