Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'head.php';
- echo '<div class="acy apl abt abb" align="center">
- <span >
- <h1>USER ONLINE</h1>
- </span>
- </div>';
- $stat = file_get_contents('stats.txt');
- $data = explode("\n",$stat);
- foreach($data as $ol){
- $on = explode('|~~|',$ol);
- if($on[1]){
- $result = geoCheckIP($on[1]);
- $country = explode(' - ',$result[country]);
- echo '<left>
- <div class="aclb fcg fsl abb">
- <div class="acw apm">
- IP Address = '.$on[1].'<br>
- User Agent = '.$on[2].'<br>Country = '.$country[1].' ('.$country[0].' )</div></div></left>';
- }
- }
- echo '<hr style="background-color:#cccccc;height:1px;border:0px solid #fff;margin:0.3em auto;width:100%;"/>
- <a class="fcs" href="http://jan-ter.com">» TUTUP «</a><br><br>';
- include 'bawah/foot.php';
- function geoCheckIP($ip){
- if(!filter_var($ip,FILTER_VALIDATE_IP)){
- /* throw new InvalidArgumentException("IP is not valid"); */
- }
- $response= file_get_contents('http://www.netip.de/search?query='.$ip);
- /* if(empty($response)){
- throw new InvalidArgumentException("Error contacting Geo-IP-Server");
- } */
- $patterns=array();
- $patterns["domain"] = '#Domain:(.*?) #i';
- $patterns["country"] = '#Country:(.*?) #i';
- $patterns["state"] = '#State/Region:(.*?)<br#i';
- $patterns["town"] = '#City:(.*?)<br#i';
- $ipInfo=array();
- foreach($patterns as $key => $pattern){
- $ipInfo[$key] = preg_match($pattern,$response,$value) && !empty($value[1]) ? $value[1] : 'not found';
- }
- return $ipInfo;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment