Sie sind hier : sebastian1012.bplaced.net/ homepage-neu / Kurze-Scripte-und-Codeschnipsel / index.php

Zurück


Der Quellcode dazu


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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<!DOCTYPE html>
<html lang="de">
<head>
  <meta charset="UTF-8">
 <link href="https://ipapi.co/static/css/ip_1e.808261e03ce8.css" rel="stylesheet" type="text/css" />
  <link href="https://ipapi.co/static/css/ip_3i.aa18e2c7d3cf.css" rel="stylesheet" type="text/css" />  

      <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head> 
<body>
    


  <div class="modal fade" id="err-modal">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title text-center" id="pModalLabel"><span class="pm-title"></span></h4>
        </div>
      </div>
    </div>
  </div>


  
<!--
<div class="navbar navbar-static-top">
  <div class="container">

    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#nav-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/">
        <img class="brand-img" src="/static/images/icon/icon-64.a33f449690cd.png">
        <div class="brand-name">ipapi</div>
      </a>
    </div>

    <div class="collapse navbar-collapse" id="nav-1">
      <ul class="nav navbar-nav navbar-right">
        
          <li><a href="#api">API</a></li>
          <li><a href="#pricing">Pricing</a></li>
          <li><a href="/developers/">Developers</a></li>
          <li><a href="/contact/">Contact</a></li>
        
        <form class="navbar-form navbar-left" role="search" method="GET" action=/>
          <div class="input-group">
            <input type="text" class="form-control" name="q" placeholder="Search IP Address">
            <span class="input-group-btn"><button type="submit" class="btn btn-primary">Locate</button></span>
          </div>
        </form>
      </ul>
    </div>

  </div>
</div>
-->

  <div class="bg-wrap">
    <div class="bg-colorgrad1"></div>

    <div class="bg-img"></div>

    <div class="text-center jumbo-ip">
      <h1> </h1>
    </div>      

    <div class="info-wrap container">
      
      <div class="row">
        
        <div class="hidden-xs hidden-sm col-md-10">
          <div class="jumbo-desc">
            <span class="line0">an&nbsp;</span>
            <span class="line1">API</span>
            <span class="line2">&nbsp;to find</span>
            <div class="line3">
              <div class="jd-anim jd-anim1">
                <span>your</span>
                <span>location</span>
                <span>timezone</span>
                <span>city</span>
                <span>country</span>
                <span>postal code</span>
                <span>latitude / longitude</span>
              </div>
              <br>
            </div>
            <div class="line4">
              <div class="jd-anim jd-anim2">
                <span>external IP address</span>
              </div>
              <div class="jd-anim jd-anim3">
                <span>of an IP address</span>
              </div>
            </div>
          </div>
        </div>


        <div class="col-xs-24 col-md-12">
          <div class="info-card md1-shadow">          
            <div class="details-wrap">
              <table class="table">       

                

                

<tr class="ip-striped">
  <td class="key">IP Address</td>
  <td class="ipval" id="ipid" data-clipboard-text=""> </td>
</tr>
 
 <tr class="ip-striped">
 <td class="key">City</td>
 <td id="cityid" class="ipval" data-clipboard-text=""> </td>
</tr>
 
 <tr class="ip-striped">
                    <td class="key">Region</td>
                    <td class="ipval" id="regionid" data-clipboard-text=""> </td>
                  </tr>
                  <tr class="ip-striped tr-sep"><td></td><td></td></tr>
                
 <tr class="ip-striped">
                    <td class="key">Country</td>
                    
                      <td id="countryid" class="ipval" data-clipboard-text="DE">
    
                      </td>
    
 <tr class="ip-striped"><td class="key">Postal Code</td><td class="ipval" data-clipboard-text="" id="postalid"> </td></tr>
         
                
                  <tr class="ip-striped"><td class="key">European Union</td><td class="ipval" data-clipboard-text="" id="in_euid"> </td></tr>
    
                
                  <tr class="ip-striped"><td class="key">Latitude / Longitude</td><td class="ipval" data-clipboard-text="" id="latitudeid"> </td></tr>
         
                
                  <tr class="ip-striped">
                    <td class="key">Time Zone</td><td class="ipval" data-clipboard-text="" id="timezoneid">
                    
                    </td>
                  </tr>
 
 <tr class="ip-striped">
        <td class="key">Kontinent Code</td><td class="ipval" data-clipboard-text="" id="continent_codeid">
                    
                    </td>
                  </tr>       
                
 <tr class="ip-striped">
      <td class="key">Utc offset</td><td class="ipval" data-clipboard-text="" id="utc_offsetid">
           </td>
       </tr>
                
                  <tr class="ip-striped"><td class="key">Calling Code</td><td class="ipval" data-clipboard-text="" id="country_calling_codeid"> </td></tr>
 
                
                  <tr class="ip-striped"><td class="key">Currency</td><td class="ipval" data-clipboard-text="" id="currencyid"> </td></tr>
 
                
                  <tr class="ip-striped"><td class="key">Languages</td><td class="ipval" data-clipboard-text="" id="langid"> </td></tr>
  
                
                  <tr class="ip-striped"><td class="key">ASN</td><td class="ipval" data-clipboard-text="" id="asnid"> </td></tr>
         
                
                  <tr class="ip-striped"><td class="key">Org</td><td class="ipval" data-clipboard-text=""n  id="orgid"> </td></tr>
         
                
            <tr class="ip-striped"><td class="key">Hostname</td><td id="hostid" class="ipval" data-clipboard-text=""></td></tr> 
              </table>
            </div>

            <div class="info-sep"></div>
 
              <div style="padding:5px;">
                <div style="width:100%; overflow:hidden; height:300px;">
                  <iframe width="100%" height="300" frameborder="0" style="border:0" id="iframeid"
                    src="" allowfullscreen>
                  </iframe>
                </div>
              </div>
            

          </div>     
        </div>
      </div>
    </div>
  </div>
 <script>
    
$.getJSON('https://ipapi.co/json', function(data){
 
  
      $('#ipid').html(data.ip);
      $('#cityid').html(data.city);
  
      $('#regionid').html(data.region+'('+data.region_code+')');
 //$('#region_codeid').html(data.region_code);
  
  var fah='<img class="c-flag"  src="https://ipapi.co/static/images/flags/24/'+data.country.toLowerCase()+'.9f8cc07c258b.png">';
  
  
      $('#countryid').html(fah+'-'+data.country+'/'+data.country_name);
  
  
  
  
  
   //   $('#country_nameid').html(data.country_name);
     $('#continent_codeid').html(data.continent_code);
      $('#in_euid').html(data.in_eu);
      $('#postalid').html(data.postal);
    // $('#longitudeid').html(data.longitude);
      $('#latitudeid').html(data.latitude+'<br>'+data.longitude);
   
      $('#timezoneid').html(data.timezone);
     $('#utc_offsetid').html(data.utc_offset);
                  $('#country_calling_codeid').html(data.country_calling_code);
      $('#currencyid').html(data.currency);
      $('#langid').html(data.languages);
      $('#asnid').html(data.asn);
      $('#orgid').html(data.org);
      $('#hostid').html(location.host);
   $('#iframeid').attr('src','https://www.google.com/maps/embed/v1/place?key=AIzaSyDwxfea8ecYMmGKMO39JF1ko5bhF4UocpM&q='+data.city+','+data.region_code+','+data.country_name)
  

  console.log(data)
})

   
  </script>

    </body>
</html>