<?php

//  PROJECT HONEY POT ADDRESS DISTRIBUTION SCRIPT
//  For more information visit: http://www.projecthoneypot.org/
//  Copyright (C) 2004-2020, Unspam Technologies, Inc.
//  
//  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
//  
//  If you choose to modify or redistribute the software, you must
//  completely disconnect it from the Project Honey Pot Service, as
//  specified under the Terms of Service Use. These terms are available
//  here:
//  
//  http://www.projecthoneypot.org/terms_of_service_use.php
//  
//  The required modification to disconnect the software from the
//  Project Honey Pot Service is explained in the comments below. To find the
//  instructions, search for:  *** DISCONNECT INSTRUCTIONS ***
//  
//  Generated On: Sat, 11 Apr 2020 00:29:53 -0400
//  For Domain: dhammacitta.org
//  
//  

//  *** DISCONNECT INSTRUCTIONS ***
//  
//  You are free to modify or redistribute this software. However, if
//  you do so you must disconnect it from the Project Honey Pot Service.
//  To do this, you must delete the lines of code below located between the
//  *** START CUT HERE *** and *** FINISH CUT HERE *** comments. Under the
//  Terms of Service Use that you agreed to before downloading this software,
//  you may not recreate the deleted lines or modify this software to access
//  or otherwise connect to any Project Honey Pot server.
//  
//  *** START CUT HERE ***
//  
define('__REQUEST_HOST', 'hpr5.projecthoneypot.org');
define('__REQUEST_PORT', '80');
define('__REQUEST_SCRIPT','/cgi/serve.php');
//  
//  *** FINISH CUT HERE ***
//  

define('__HPOT_TAG1',    '71a9ebf18c15e510a3f125b38099a530');
define('__HPOT_TAG2',    'b5796aa8b122f7fcf6f7ff495a7fb112');
define('__HPOT_TAG3',    '34aa2473d1aa4705f92165addfe297ff');

define('__CLASS_STYLE_1','wogisi');
define('__CLASS_STYLE_2','frotucruwode');

define('__DIV1',         'spo4ur5g8');

define('__VANITY_L1',    'MEMBER OF PROJECT HONEY POT');
define('__VANITY_L2',    'Spam Harvester Protection Network');
define('__VANITY_L3',    'provided by Unspam');

define('__DOC_TYPE1',    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n');
define('__HEAD1',        '<html>\n<head>\n');
define('__HEAD2',        '<title>Touching</title>\n</head>\n');
define('__ROBOT1',       '<meta name="robots" content="noarchive">\n<meta name="robots" content="noindex">\n<meta name="robots" content="follow">\n');
define('__NOCOLLECT1',   '<meta name="no-email-collection" content="/">\n');
define('__TOP1',         '<body>\n<center>\n');
define('__EMAIL1A',      '<a href="mailto:');
define('__EMAIL1B',      '" style="display: none;">');
define('__EMAIL1C',      '</a>');
define('__EMAIL2A',      '<a href="mailto:');
define('__EMAIL2B',      '" style="display:none;">');
define('__EMAIL2C',      '</a>');
define('__EMAIL3A',      '<a style="display: none;" href="mailto:');
define('__EMAIL3B',      '">');
define('__EMAIL3C',      '</a>');
define('__EMAIL4A',      '<a style="display:none;" href="mailto:');
define('__EMAIL4B',      '">');
define('__EMAIL4C',      '</a>');
define('__EMAIL5A',      '<a href="mailto:');
define('__EMAIL5B',      '"></a>');
define('__EMAIL5C',      '..');
define('__EMAIL6A',      '<span style="display: none;"><a href="mailto:');
define('__EMAIL6B',      '">');
define('__EMAIL6C',      '</a></span>');
define('__EMAIL7A',      '<span style="display:none;"><a href="mailto:');
define('__EMAIL7B',      '">');
define('__EMAIL7C',      '</a></span>');
define('__EMAIL8A',      '<!-- <a href="mailto:');
define('__EMAIL8B',      '">');
define('__EMAIL8C',      '</a> -->');
define('__EMAIL9A',      '<div id="'.__DIV1.'"><a href="mailto:');
define('__EMAIL9B',      '">');
define('__EMAIL9C',      '</a></div><br><script language="JavaScript" type="text/javascript">document.getElementById(\''.__DIV1.'\').innerHTML=\'\';</script>');
define('__EMAIL10A',     '<a href="mailto:');
define('__EMAIL10B',     '"><!-- ');
define('__EMAIL10C',     ' --></a>');
define('__LEGAL1',       '');
define('__LEGAL2',       '\n');
define('__STYLE1',       '\n<style>a.'.__CLASS_STYLE_1.'{color:#FFF;font:bold 10px arial,sans-serif;text-decoration:none;}</style>');
define('__VANITY1',      '<table cellspacing="0"cellpadding="0"border="0"style="background:#999;width:230px;"><tr><td valign="top"style="padding: 1px 2px 5px 4px;border-right:solid 1px #CCC;"><span style="font:bold 30px arial,sans-serif;color:#666;top:0px;position:relative;">@</span></td><td valign="top" align="left" style="padding:3px 0 0 4px;"><a href="http://www.projecthoneypot.org/" class="'.__CLASS_STYLE_1.'">'.__VANITY_L1.'</a><br><a href="http://www.unspam.com"class="'.__CLASS_STYLE_1.'">'.__VANITY_L2.'<br>'.__VANITY_L3.'</a></td></tr></table>\n');
define('__BOTTOM1',      '</center>\n</body>\n</html>\n');


function getLegalContent() { return '<table cellpadding="0" border="0" cellspacing="0">\n<tr>\n<td><tt>&nbsp; <b><font color=white>a</font></b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <b><font color=white>e</font></b>&nbsp; &nbsp;&nbsp; <b><font color=white>t</font></b>&nbsp; <b><font color=white>a</font></b>&nbsp;<b>TER&#77;S</b>&nbsp;<b>AN&#68;</b>&nbsp;<b>&#67;O&#78;</b><br>&nbsp;<br>The &#119;ebsite from &#119;hich you accessed this<br>to you s&#117;&#98;jec&#116; &#116;o<font color=white>i</font>the following conditio<br>other ter<!-- preventive bumpy revenue promising russian -->ms<font color=white>f</font>go&#118;e<!-- broadcasting method therapeutic amphibious -->r&#110;ing<font color=white>s</font>ac&#99;es&#115;<font color=white>e</font>t&#111;<font color=white>d</font>the &#87;ebs<br>W<!-- clipfed added -->e&#98;site you a&#99;cep&#116; these term&#115; and<font color=white>f</font>condi<br>read them carefully. An&#121;<font color=white>h</font>&#78;on&#45;Hum&#97;n Vi&#115;it<br>a&#103;e<!-- homogenous animato gigantic theatre -->nts<font color=white>p</font>of &#116;he in&#100;ivid&#117;al(s) wh&#111; &#99;ont&#114;ol&#115;<br>them. Th&#101; access rights granted to you &#117;<br>n&#111;n-&#116;r<!-- clothes -->&#97;nsferable witho&#117;t the ex&#112;ress wri<br>Website.<br><br><b><font color=white>e</font></b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <b>S&#80;ECI&#65;L</b>&nbsp;<b>&#76;I&#67;E&#78;SE<font color=white>e</font>RES&#84;RICTI</b><br>&nbsp;<br>Sp&#101;cial re&#115;tri&#99;&#116;ions on a visito&#114;\'s lice<br>Non-Human Vis&#105;tors. No&#110;-Hu&#109;an Vi&#115;it&#111;rs i<br>spider&#115;&#44;<font color=white>s</font>bots, indexers&#44; rob&#111;ts, cr&#97;wler<br>pro<!-- delight steely -->grams designed t&#111; acc&#101;&#115;s, rea&#100;, c&#111;mpi<br>automaticall&#121;.<br><br>Em&#97;il address&#101;s on &#116;his site are conside<br>It is recognized tha&#116; these email addre&#115;<br>a&#108;one. You ackno&#119;ledge and<font color=white>h</font>agree &#116;ha&#116; ea<br>&#104;a<!-- service stairs -->s a va&#108;ue not l<!-- geodesic astonishing vagabond -->ess th&#97;n US $50. You &#102;u<br>&#115;torage, a&#110;d/&#111;r &#100;istribut<!-- faded -->ion of these a&#100;<br>value of these a&#100;dress&#101;s. I&#110;tentional c&#111;<br>s&#116;oring &#116;his Webs&#105;te\'s email addresse&#115; &#105;<br>&#97;greem&#101;nt and expressly<font color=white>a</font>prohibit&#101;d&#46;<br><br>&nbsp; &nbsp; &nbsp; <b><font color=white>h</font></b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <b><font color=white>i</font></b>&nbsp; &nbsp; &nbsp; <b>APPLICABLE</b>&nbsp;<b>LAW</b>&nbsp;<br>&nbsp;<br>Eac&#104; &#112;ar&#116;y agrees that<font color=white>c</font>any s&#117;it, a&#99;tion <br>against the other in conn<!-- oceangoing rear content -->ectio&#110; wit&#104;<font color=white>t</font>or <br>("Jud&#105;cial Actio<!-- sabbatical dollars act inspector fax -->n"&#41; shall be &#103;o&#118;erned by<br>the<font color=white>o</font>reg&#105;&#115;&#116;ere&#100; Administrative Contact (t<br>&#115;uc&#104; laws are a&#112;plied to agreeme&#110;t&#115; betw<br>a&#110;d<font color=white>p</font>pe&#114;f&#111;r&#109;e&#100; entirely<font color=white>g</font>within<font color=white>k</font>&#116;he &#65;dmin <br>of fe&#100;er&#97;l and sta&#116;e courts within<font color=white>d</font>t&#104;e &#65;<br>an&#121; act&#105;o&#110; broug&#104;t aga&#105;nst him i&#110; connec<br>Se&#114;v&#105;ce. &#89;o&#117; &#99;ons&#101;&#110;t to e&#108;&#101;ctronic<font color=white>c</font>servi<br>th&#101; above agreement.<br><br>&nbsp;&nbsp; <b><font color=white>k</font></b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <b><font color=white>p</font></b>&nbsp; &nbsp;&nbsp; <b><font color=white>s</font></b>&nbsp;<b>REC<!-- confrontation down -->ORDS</b>&nbsp;<b>O<!-- ceremonial ballot ships congress upshot -->&#70;</b>&nbsp;<b>V&#73;SIT</b><br>&nbsp;<br>Y&#111;u con&#115;&#101;nt to havi&#110;&#103; your Intern&#101;t Prot<br>m&#97;&#121; appea<!-- server makeshift doctor predestination -->r &#115;ome&#119;here on this &#112;age (t&#104;e "<br>&#97;bu<!-- moderato degree brachial beauties suburban -->se. The Iden&#116;if&#105;er is uniquely matc&#104;e<br>Visi&#116;ors &#97;&#103;ree<font color=white>i</font>n&#111;t to use t&#104;is<font color=white>p</font>a&#100;dress f<br><br>VIS&#73;TORS<font color=white>k</font>AGREE THAT HARVEST&#73;NG, GAT&#72;E<!-- hoc surprised tangent nopar -->RIN<br>P&#65;RTY &#79;R SENDING A&#78;&#89; M&#69;SSAGE(S) TO THE I<br>&#83;UBSEQU&#69;NT B&#82;EACH OF THESE TERMS &#79;F SERV<br></tt></td>\n<td><tt><b>DITIO&#78;S</b>&nbsp;<b>OF<font color=white>s</font>USE</b>&nbsp;<br><br>&nbsp;agreement ("the Websit&#101;") is provided<br>ns&#46;<font color=white>h</font>The&#115;e terms are in &#97;ddi&#116;&#105;on t&#111; any<br>i&#116;e. By<font color=white>s</font>v&#105;siting (in<font color=white>c</font>any m&#97;n&#110;er) t&#104;e<br>tion&#115; &#40;t&#104;e "<!-- glossy consultant trophy tabulate -->Terms of Ser&#118;ice").<font color=white>g</font>Pleas&#101;<br>&#111;rs t&#111; the W&#101;bsite<font color=white>e</font>sh<!-- possession jaunty starry tasty ban -->&#97;ll be cons&#105;dere&#100;<br>, aut&#104;ors or<font color=white>h</font>ot&#104;er<!-- farinaceous doctoral frigid -->wi&#115;e mak&#101;s u<!-- wellgroomed -->se &#111;f<br>nder the Terms of Ser&#118;ice<font color=white>e</font>are<br>tt&#101;n perm&#105;ssio<!-- collaboration deficit picture wedge -->n of<!-- cow aquatic sigh taxpayer longtime -->&nbsp;the owner of<font color=white>h</font>t&#104;e<br><br><br><b>ON&#83;</b>&nbsp;<b>FOR</b>&nbsp;<b>NON-HUMAN<font color=white>t</font>VISITORS<!-- synchronous --></b>&nbsp;<br><br>nse to access the &#87;ebsit&#101; apply to<br>n&#99;lude, b<!-- ac people nook -->ut are<!-- erumpent gay viewpoint -->&nbsp;not lim<!-- kaput able related vengeful -->it<!-- gunshot bargaining -->ed t&#111;, web<br>s,<font color=white>p</font>harv&#101;sters, or any other c&#111;m&#112;&#117;ter<br>le &#111;r<font color=white>f</font>gather &#99;ontent from the We&#98;sit&#101;<br><br><br>red pr&#111;prietary &#105;&#110;tellectua&#108; p&#114;op&#101;rty.<br>ses are pr&#111;&#118;ided fo&#114; huma<!-- strange tyro -->&#110; visitors<br>ch e<!-- untenable reserved -->&#109;ail &#97;ddress<font color=white>c</font>the W&#101;bsite contains<br>rther a&#103;ree that<font color=white>a</font>the compilati&#111;n,<br>&#100;res&#115;&#101;s substant<!-- aesthetic minor able international width -->ial&#108;y d&#105;minishes &#116;&#104;e<br>ll&#101;ctio&#110;, harv&#101;&#115;ting, g&#97;thering, and/or<br>s recog&#110;ized<font color=white>o</font>as &#97;<font color=white>e</font>vi&#111;lation o&#102; this<br><br><br><b>AND</b>&nbsp;<b>&#74;URISDICTION</b>&nbsp;<br><br>&#111;r proceeding brought by suc&#104; party<br>arising f&#114;o&#109; the Terms of Se&#114;&#118;ice<br>&nbsp;the law of the<font color=white>h</font>state of residen&#99;e of<br>he "Ad&#109;in State")<font color=white>c</font>for the &#87;eb&#115;ite<font color=white>t</font>as<br>een Adm&#105;n S<!-- obstacle lumpish -->tate re&#115;idents &#101;&#110;tere&#100; i&#110;to<br>&#83;tate. You consent to the j&#117;r&#105;&#115;dic&#116;ion<br>d&#109;in State.<font color=white>k</font>You consent to th<!-- notable sense conservative -->e venue<font color=white>i</font>in<br>&#116;ion with breac&#104;e&#115; of these Terms of<br>ce of proces&#115; regardin&#103; actio&#110;s un&#100;er<br><br><br><b>&#79;R<!-- kind relieved intent shame anthropoid --></b>&nbsp;<b>&#85;S<!-- satellites zealous grapes little slave -->E</b>&nbsp;<b>AND</b>&nbsp;<b>ABUSE</b>&nbsp;<br><br>o&#99;ol addres&#115; reco&#114;ded.<font color=white>h</font>An email<font color=white>c</font>a&#100;dr&#101;s<!-- figured carbonara cathedral tourists inbred -->&#115;<br>Identifier"&#41;<font color=white>i</font>if we suspect potenti&#97;l<br>d to &#121;our Internet<font color=white>a</font>P&#114;otocol a&#100;dr&#101;ss.<br>or any &#114;eason.<br><br>G,<font color=white>g</font>STOR<!-- quickest vivacious chair -->ING, TR&#65;NSF&#69;RR&#73;&#78;G &#84;O A THIRD<br>DENTIFI&#69;R<font color=white>s</font>CONS&#84;ITUTES &#65;N &#65;CCEPTANCE AND<br>I&#67;E.<br></tt></td>\n</tr>\n</table>\n<br>'; }


?><?php 

// 
// PROXY SUPPORT
//  
// This honey pot script supports Proxies. If your webserver requires a proxy
// for outbound connections you may configure this honey pot's settings to use
// a proxy.
//
// For more information, visit: 
//     http://www.projecthoneypot.org/settings_help.php
//
//



function formatHTML($s) {
    return str_replace('\n',"\n",$s);
}

function getDocType()       { return formatHTML(__DOC_TYPE1); }
function getHeadHTML1()     { return formatHTML(__HEAD1); }
function getRobotHTML()     { return formatHTML(__ROBOT1); }
function getNoCollectHTML() { return formatHTML(__NOCOLLECT1); }
function getHeadHTML2()     { return formatHTML(__HEAD2); }
function getTopHTML()       { return formatHTML(__TOP1); }
function getEmailHTML($method,$m) { 
    switch ($method) {
    case 0: return "";
    case 1: return formatHTML(__EMAIL1A.$m.__EMAIL1B.$m.__EMAIL1C); 
    case 2: return formatHTML(__EMAIL2A.$m.__EMAIL2B.$m.__EMAIL2C); 
    case 3: return formatHTML(__EMAIL3A.$m.__EMAIL3B.$m.__EMAIL3C); 
    case 4: return formatHTML(__EMAIL4A.$m.__EMAIL4B.$m.__EMAIL4C); 
    case 5: return formatHTML(__EMAIL5A.$m.__EMAIL5B); 
    case 6: return formatHTML(__EMAIL6A.$m.__EMAIL6B.$m.__EMAIL6C); 
    case 7: return formatHTML(__EMAIL7A.$m.__EMAIL7B.$m.__EMAIL7C); 
    case 8: return formatHTML(__EMAIL8A.$m.__EMAIL8B.$m.__EMAIL8C); 
    case 9: return formatHTML(__EMAIL9A.$m.__EMAIL9B.$m.__EMAIL9C); 
    }
    return formatHTML(__EMAIL10A.$m.__EMAIL10B.$m.__EMAIL10C); 
}
function getLegalHTML()   { return formatHTML(__LEGAL1.(getLegalContent()).__LEGAL2); }
function getStyleHTML()   { return formatHTML(__STYLE1); }
function getVanityHTML()  { return formatHTML(__VANITY1); }
function getBottomHTML()  { return formatHTML(__BOTTOM1); }

function readSettings() {
    $settings      = NULL;
    $settings_file = dirname(__FILE__)."/phpot_settings.php";

    if (is_file($settings_file) && is_readable($settings_file)) {
        $fp = fopen($settings_file,"r");
        $contents = "";
        while (!feof($fp)) {
            $contents .= fread($fp, 8192);
        }
        fclose($fp);

        $lines = explode("\n",$contents);
        foreach ($lines as $line) {
            if (trim($line) !== "") {
                list ($setting, $value) = @explode(":",$line,2);
                switch ($setting) {
                case "proxy_host": 
                    $settings["sock_host"] = trim($value);
                    break;
                case "proxy_port":
                    $settings["sock_port"] = trim($value);
                    break;
                }
                if (trim($value) !== "") {
                    $settings[trim($setting)] = trim($value);
                }
            }
        }
    }

    if (isset($settings["proxy_host"]) && isset($settings["proxy_port"]) && !isset($settings["use_proxy"])) {
        $settings["use_proxy"] = "1";
    } else {
        $settings["use_proxy"] = "0";
    }

    if (isset($settings["proxy_user"]) && isset($settings["proxy_pass"]) && !isset($settings["proxy_auth"])) {
        $settings["proxy_auth"] = "basic";
    } else {
        $settings["proxy_auth"] = "none";
    }

    if (!isset($settings["sock_host"])) $settings["sock_host"] = __REQUEST_HOST;
    if (!isset($settings["sock_port"])) $settings["sock_port"] = __REQUEST_PORT;

    return $settings;
}

function performRequest($request) {
    $response = "";

    $settings = readSettings();

    if ($settings["use_proxy"] == "1") {
        // POST via proxy
        $post_url = "http://".__REQUEST_HOST.":".__REQUEST_PORT.__REQUEST_SCRIPT;

        $head  = "POST ".$post_url." HTTP/1.0\r\n";
        //$head .= "Host: ".__REQUEST_HOST."\r\n";
        $head .= "User-Agent: PHPot ".__HPOT_TAG2."\r\n";
        if ($settings["proxy_auth"] == "basic") {
            $head .= "Proxy-Authorization: Basic ".base64_encode($settings["proxy_user"].":".$settings["proxy_pass"])."\r\n";
        }
        $head .= "Cache-Control: no-store, no-cache\r\n";
        $head .= "Accept: */*\r\n";
        $head .= "Pragma: no-cache\r\n";
        $head .= "Content-Type: application/x-www-form-urlencoded\r\n";
        $head .= "Content-Length: ".strlen($request)."\r\n";
        $head .= "Connection: close\r\n\r\n";

    } else {
        // POST directly
        $head  = "POST ".__REQUEST_SCRIPT." HTTP/1.1\r\n";
        $head .= "Host: ".__REQUEST_HOST."\r\n";
        $head .= "User-Agent: PHPot ".__HPOT_TAG2."\r\n";
        $head .= "Content-Type: application/x-www-form-urlencoded\r\n";
        $head .= "Content-Length: ".strlen($request)."\r\n";
        $head .= "Connection: close\r\n\r\n";
    }
    
    $errno  = NULL;
    $errstr = NULL;
    $fd = @fsockopen ($settings["sock_host"], $settings["sock_port"], $errno, $errstr, 20);

    if (!$fd) {
        // Socket Error
        die("\n<BR>Unable to contact the Server. Are outbound connections disabled? (If a proxy is required for outbound traffic, you may configure the honey pot to use a proxy. For instructions, visit http://www.projecthoneypot.org/settings_help.php)<BR>\n");
        return "-1";
    } else {

        fputs($fd,$head.$request);
        while(!feof($fd)) {
            $response .= fgets($fd,4096);
        }
        fclose($fd);
    }

    return $response;
}

function prepareRequest() {
    $postvars          = array();
    $postvars["tag1"]  = __HPOT_TAG1;
    $postvars["tag2"]  = __HPOT_TAG2;
    $postvars["tag3"]  = __HPOT_TAG3;
    if (!($handle = fopen(__FILE__,"r"))) {
        die("\n<BR>Unable to read contents of ".__FILE__." for hashing<BR>\n");
        return -2;
    }
    $contents = "";
    while (!feof($handle)) {
        $contents .= fread($handle, 8192);
    }
    fclose($handle);
    $postvars["tag4"]   = md5(preg_replace("/[^a-zA-Z0-9]/","",$contents));
    $postvars["ip"]    = $_SERVER["REMOTE_ADDR"];
    $postvars["svrn"]  = $_SERVER["SERVER_NAME"];  
    $postvars["svp"]   = $_SERVER["SERVER_PORT"];  
    $postvars["svip"]  = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : "";
    $postvars["rquri"]   = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : "";
    $postvars["phpself"] = str_replace(' ','%20',$_SERVER["PHP_SELF"]);
    $postvars["version"] = "php-".phpversion();
    $postvars["sn"]     = str_replace(' ','%20',$_SERVER["SCRIPT_NAME"]);
    $postvars["ref"]    = isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "";
    $postvars["uagnt"]  = isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "";
    if (isset($_POST) && count($_POST) > 0) {
        $postvars["has_post"] = count($_POST);
        for (reset($_POST);list($k,$v) = each($_POST);) {
            $postvars["post|".$k] = $v;
        }
        reset($_POST);
    }
    if (isset($_GET) && count($_GET) > 0) {
        $postvars["has_get"] = count($_GET);
        for (reset($_GET);list($k,$v) = each($_GET);) {
            $postvars["get|".$k] = $v;
        }
        reset($_GET);
    }
    if (isset($_SERVER) && count($_SERVER) > 0) {
        $i = 0;
        for (reset($_SERVER);list($k,$v) = each($_SERVER);) {
            if ($k !== "HTTP_COOKIE" && preg_match('/^HTTP_/',$k)) {
                $postvars["header|".$k] = $v;
                $i++;
            }
        }
        $postvars["has_header"] = $i;
        reset($_SERVER);
    }

    return $postvars;
}

function transcribeResponse(& $response) {
    $settings  = NULL;
    $arr       = explode("\n",$response);
    $isParam   = FALSE;

    
    for ($i=0;list(,$v)=each($arr);$i++) {
        if ($v == "<END>")   $isParam = FALSE;

        if ($isParam) {          
            $pieces = explode("=",$v,2);
            $settings[$pieces[0]] = urldecode($pieces[1]);
        }
        if ($v == "<BEGIN>") $isParam = TRUE;
    }
    

    if (isset($settings["directives"])) {
        $settings["directives"] = explode(",",$settings["directives"]);
    }

    return $settings;
}

header("Cache-Control: no-store, no-cache");
header("Pragma: no-cache");

$response  = "";
$request   = "";
$post      = prepareRequest();

for (reset($post);list($k,$v) = each($post);) {
    $request .= "&".urlencode($k)."=".urlencode(stripslashes($v));
}
$request    = substr($request,1);
$response   = performRequest($request);
if ($response == "-1") {
    exit();
}
$settings   = transcribeResponse($response);

$directives   = $settings["directives"];
$email        = isset($settings["email"]) ? $settings["email"] : "";
$emailmethod  = isset($settings["emailmethod"]) ? $settings["emailmethod"] : 0;




?>
<?php echo (isset($directives[0]) && $directives[0]==1) ? getDocType()    : ""; ?>
<?php echo (isset($settings["injDocType"])) ? formatHTML($settings["injDocTypeMsg"]) : ""; ?>
<?php echo (isset($directives[1]) && $directives[1]==1) ? getHeadHTML1()   : ""; ?>
<?php echo (isset($settings["injHead1HTML"])) ? formatHTML($settings["injHead1HTMLMsg"]) : ""; ?>
<?php echo (isset($directives[8]) && $directives[8]==1) ? getRobotHTML()   : ""; ?>
<?php echo (isset($settings["injRobotHTML"])) ? formatHTML($settings["injRobotHTMLMsg"]) : ""; ?>
<?php echo (isset($directives[9]) && $directives[9]==1) ? getNoCollectHTML()   : ""; ?>
<?php echo (isset($settings["injNoCollectHTML"])) ? formatHTML($settings["injNoCollectHTMLMsg"]) : ""; ?>
<?php echo (isset($directives[1]) && $directives[1]==1) ? getHeadHTML2()   : ""; ?>
<?php echo (isset($settings["injHead2HTML"])) ? formatHTML($settings["injHead2HTMLMsg"]) : ""; ?>
<?php echo (isset($directives[2]) && $directives[2]==1) ? getTopHTML()    : ""; ?>
<?php echo (isset($settings["injTopHTML"])) ? formatHTML($settings["injTopHTMLMsg"]) : ""; ?>
<?php
   if (isset($settings["actMsgOn"])) { 
       echo formatHTML($settings["actMsg"]); 
   }
   if (isset($settings["errMsgOn"])) { 
       echo formatHTML($settings["errMsg"]); 
   }
   if (isset($settings["customMsgOn"])) { 
       echo formatHTML($settings["customMsg"]); 
   }
?>
<?php echo (isset($directives[3]) && $directives[3]==1) ? getLegalHTML()  : ""; ?>
<?php echo (isset($settings["injLegalHTML"])) ? formatHTML($settings["injLegalHTMLMsg"]) : ""; ?>
<?php
   if (isset($settings["altLegalOn"])) { 
       echo formatHTML($settings["altLegalMsg"]); 
   } 
?>
<?php echo (isset($directives[4]) && $directives[4]==1) ? getEmailHTML(intval($emailmethod),$email)  : ""; ?>
<?php echo (isset($settings["injEmailHTML"])) ? formatHTML($settings["injEmailHTMLMsg"]) : ""; ?>
<?php echo (isset($directives[5]) && $directives[5]==1) ? getStyleHTML()  : ""; ?>
<?php echo (isset($settings["injStyleHTML"])) ? formatHTML($settings["injStyleHTMLMsg"]) : ""; ?>
<?php echo (isset($directives[6]) && $directives[6]==1) ? getVanityHTML() : ""; ?>
<?php echo (isset($settings["injVanityHTML"])) ? formatHTML($settings["injVanityHTMLMsg"]) : ""; ?>
<?php
   if (isset($settings["altVanityOn"])) {
        echo formatHTML($settings["altVanityMsg"]);
    }
?>
<?php echo (isset($directives[7]) && $directives[7]==1) ? getBottomHTML() : ""; ?>
<?php echo (isset($settings["injBottomHTML"])) ? formatHTML($settings["injBottomHTMLMsg"]) : ""; ?>
