<?php ini_set("display_errors", "off"); header("Content-Type:text/html;charset=utf-8"); if (is_file($_SERVER['DOCUMENT_ROOT'] . '/360safe/360webscan.php')) { require_once $_SERVER['DOCUMENT_ROOT'] . '/360safe/360webscan.php'; } @(require_once 'index.html'); require_once './class/getarea.class.php'; $ipdz = htmlentities($_REQUEST[ipdz], ENT_NOQUOTES); //过滤非法字符 $area = GetArea($ipdz); ?> <div style="margin:auto ; padding:0;width:600px ; height:200px "> <table border="0" width="600px" align="center" height="60px" > <tr align="center"> <td> <strong><font size="5" face="微软雅黑" color="blue"><?php print_r($area[1][3]); ?> </font> </strong> </td> </tr> </table> <table border="0" width="600px" align="center" > <tr> <td> <li> <font color="red" face="微软雅黑" align="left"> 推荐数据: <?php
<?php /* @获取本地电脑ip地址并且得到位置 */ //header("Content-Type:text/html;charset=utf-8"); require_once '../class/getarea.class.php'; //引入getarea函数 $clientip = get_client_ip(); //获取客户端本地ip $area = GetArea($clientip); //调用Area函数 获取地址 ?> <html> <head> <title> 您本地电脑IP地址 </title> </head> <body style="border:0 ; margin:0px; padding:0 ;"> <table style=" width: 700px ; margin: auto; hight: 20px "> <center> <font color="red" > 您本地IP是:[<?php echo $clientip; ?> ] 来自:<?php echo "{$czipxx}"; ?> </font> </center> </table> </body>
<?php /* * 获取ip地址信息类 by liangwei * 为思科技术社区实现用户回帖自动根据ip返回归属地功能. * 案例:http://www.sikejishu.com/forum.php?mod=viewthread&tid=7177 */ header("Content-Type:text/html;charset=utf-8"); require_once 'getarea.class.php'; //引入getarea函数 $area = GetArea($_REQUEST[ipadd]); $ipadd = $area[1][1]; echo $ipadd;
th{ background:#3066a6; color:#FFFFFF; } td{ padding-top:5px; color:#660066; font-size:16px; } </style> </head> <div class="area"> <?php $info_decode = GetArea(); echo "您在 <font color='green'>" . $info_decode['country'] . $info_decode['province'] . "省" . $info_decode['city'] . "市 " . $info_decode['isp'] . "网络</font>"; ?> </div> <table width="500px;"> <tr> <th>Tips</th> </tr> <tr> <td><?php echo $tips[$rand_num]['content']; ?> </td> </tr> </table>
<?php date_default_timezone_set('PRC'); if (is_file($_SERVER['DOCUMENT_ROOT'] . '/360safe/360webscan.php')) { require_once $_SERVER['DOCUMENT_ROOT'] . '/360safe/360webscan.php'; } header("Content-Type:text/html;charset=utf-8"); require_once 'class/getarea.class.php'; //引入getarea函数 $userip = get_client_ip(); //获取客户端本地ip $area = htmlentities(GetArea($userip)); //调用Area函数 获取地址 // 连主库 // $link=mysql_connect(SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS); // if ($link) // { // mysql_select_db(SAE_MYSQL_DB,$link); // $ip = htmlentities($_REQUEST["ip"], ENT_NOQUOTES); // $address =htmlentities( $_REQUEST["address"]) ; // $datetime = htmlentities(date('Y-m-d H:i:s',time())); // $sql = "INSERT INTO `ipinfo` (`ip`,`address`,`userip`,`datetime`) VALUES ('$ip','$address','$userip','$datetime')"; // } // else // { // echo "数据库连接错误,请联系管理员邮箱:liangwei#liangwei.cc" ; // } // mysql_query("set names GBK"); // if (!MySQL_query($sql,$link)) // { // echo "<script>alert('添加记录失败,请按照过规范认真添加信息。');window.location.href='tijiaoip.html'</script>";