<?
/**
XIP Class - Proxy Detection and IP Functions class for PHP - File Name: proxydetect.php
Copyright (C) 2004-2006 Volkan Küçükçakar. All Rights Reserved.
(Volkan Kucukcakar)
http://www.developera.com
You are requested to retain this copyright notice in order to use
this software.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
?>
<? /*
XIP Class - EXAMPLE 1 - proxydetect.php
This example demonstrates:
Proxy type, proxy info, client IP detection
*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<title>XIP Class - developera.com/xip</title>
<body bgcolor="#FFFFFF" text="#000000">
<center>
<p>Proxy Detection | <a href="ipfunctions.php">IP Functions</a> | <a href="blacklist_local.php">Blacklist (Local)</a> | <a href="iplog.php">IP Log</a> | <a href="CheckRBL.php">Blacklist (Check RBL)</a></p>
<p align="left"><font color="#FF6666">XIP Class - EXAMPLE 1 - proxydetect.php - </font><font color="#707070">Proxy type, proxy info, client IP detection </font></p>
<p> </p>
<table width="600" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="200">Proxy Detected</td>
<td width="400">
<?
require('../class.XIP.php');
$XIP=new XIP();
if ($XIP->Proxy['detected']){
echo "DETECTED";
}elseif ($XIP->Proxy['suspicious']){
echo "SUSPICIOUS";
}else{
echo "NOT DETECTED";
}
?>
</td>
</tr>
<tr>
<td>Proxy IP </td>
<td>
<? echo $XIP->IP['proxy']; ?>
</td>
</tr>
<tr>
<td>Client IP </td>
<td>
<? echo $XIP->IP['client']; ?>
</td>
</tr>
<tr>
<td>All IP addresses captured </td>
<td>
<? echo $XIP->IP['all']; ?>
</td>
</tr>
<tr>
<td>Proxy Type </td>
<td>
<?
if ($XIP->Proxy['anonymous']) {
echo "ANONYMOUS";
}else{
echo "TRANSPARENT";
}
?>
</td>
</tr>
<tr>
<td>Proxy Name </td>
<td>
<? echo $XIP->Proxy['name']; ?>
</td>
</tr>
<tr>
<td>Proxy Info </td>
<td>
<?
foreach($XIP->Proxy['info'] as $key=>$value){
echo "$key=$value<br>";
}
?>
</td>
</tr>
<tr>
<td>Proxy Headers </td>
<td>
<?
foreach($XIP->Proxy['headers'] as $key=>$value){
echo "$key=$value<br>";
}
?>
</td>
</tr>
</table>
<p> </p>
<p><strong>XIP Class<br>
</strong>Proxy Detection and IP Functions class for PHP<strong><br>
</strong><a href="http://www.developera.com/xip">www.developera.com/xip</a></p>
<p> </p>
</center>
</body>
</html>
|