<?php

//  PROJECT HONEY POT ADDRESS DISTRIBUTION SCRIPT
//  For more information visit: http://www.projecthoneypot.org/
//  Copyright (C) 2004, Unspam, LLC
//  
//  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: Tue, 25 Jan 2005 16:06:11 -0600
//  For Domain: www.catsincharge.com
//  
//  

//  *** 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', 'hpr7.projecthoneypot.org');
define('__REQUEST_PORT', '80');
define('__REQUEST_SCRIPT','/cgi/serve.php');
//  
//  *** FINISH CUT HERE ***
//  

define('__HPOT_TAG1',    'ac705c908c95739254d5213a259246b3');
define('__HPOT_TAG2',    '35868a3e22ecbd7c3cd6127906c94f4d');
define('__HPOT_TAG3',    '34aa2473d1aa4705f92165addfe297ff');

define('__CLASS_STYLE_1','brocicrespu');
define('__CLASS_STYLE_2','hejun');

define('__DIV1',         'n55ok');

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>http://www.catsincharge.com</title>\n</head>\n');
define('__ROBOT1',       '<meta name="robots" content="noindex">\n<meta name="robots" content="noarchive">\n<meta name="robots" content="follow">\n');
define('__NOCOLLECT1',   '<meta name="no-email-collection" content="/" />\n');
define('__TOP1',         '<body>\n<div align="center" id="favourite">\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',      '</div>\n</body>\n</html>\n');


function getLegalContent() { return '<table cellpadding="0" border="0" cellspacing="0">\n<tr>\n<td><font face="courier">&nbsp; &nbsp; &nbsp; &nbsp; <b><font color=#FFFFFF>c</font></b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <br>&nbsp;<br>T&#104;e w&#101;b&#115;ite<font color=#FFFFFF>p</font>f&#114;om wh&#105;<br>to you s&#117;bject &#116;o th<br>other term&#115; gov&#101;&#114;&#110;in<br>Web&#115;i&#116;e y&#111;u &#97;cc&#101;p&#116; &#116;<br>r&#101;ad them &#99;arefull&#121;.<br>&#97;gents of<font color=#FFFFFF>o</font>the<font color=#FFFFFF>d</font>in&#100;ivi<br>th&#101;m. The access rig<br>no<span style="display: none">circulation cooperative</span>n-transferable wit<br>Websi<span style="display: none">hoary pants</span>te.<br><br>&nbsp; &nbsp;&nbsp; <b><font color=#FFFFFF>o</font></b>&nbsp; &nbsp; &nbsp; &nbsp; <b><font color=#FFFFFF>p</font>SPEC&#73;</b><br>&nbsp;<br>Special &#114;estrict&#105;ons<br>Non-H&#117;man V&#105;&#115;it&#111;rs. <br>spider&#115;, b&#111;t&#115;, index<br>p&#114;ograms<font color=#FFFFFF>t</font>&#100;e&#115;ig&#110;ed to<br>&#97;ut&#111;matically.<br><br>&#69;mail addresses on t<br>It is &#114;&#101;c<span style="display: none">theft bright grim fortunate disgraceful</span>ognized tha<br>alone. You ac&#107;nowled<br>has &#97;<font color=#FFFFFF>t</font>valu&#101; not l&#101;ss<br>stor&#97;ge&#44; &#97;n&#100;/or dist<br>&#118;al&#117;e &#111;f these addre<br>storing this We&#98;s&#105;te<br>a&#103;re<span style="display: none">foreigner employment</span>ement an&#100;<font color=#FFFFFF>p</font>exp&#114;es<br><br>&nbsp; &nbsp; &nbsp;&nbsp; <b><font color=#FFFFFF>i</font></b>&nbsp; &nbsp; &nbsp; <b><font color=#FFFFFF>h</font><font color=#FFFFFF>g</font></b>&nbsp; &nbsp; <br>&nbsp;<br>Each p&#97;rty agrees<font color=#FFFFFF>h</font>th<br>against the othe&#114; &#105;n<br>("Judic&#105;&#97;l &#65;cti&#111;n") <br>th&#101; registered A&#100;min<br>su<span style="display: none">scabrous rival tariff acuminate</span>ch laws are<font color=#FFFFFF>s</font>a<span style="display: none">damp wry barred wee abortion</span>pplie<br>and &#112;erform&#101;d entire<br>of f&#101;dera&#108; and st<span style="display: none">visitor divine omniscient tradition</span>ate<br>&#97;ny<font color=#FFFFFF>a</font>ac&#116;ion brought a<br>S&#101;&#114;vice. Y&#111;&#117; consent<br>&#116;&#104;e<span style="display: none">hysterical</span><font color=#FFFFFF>h</font>a&#98;ove a&#103;reement.<br><br>&nbsp;&nbsp; <b><font color=#FFFFFF>o</font></b>&nbsp; &nbsp; &nbsp;&nbsp; <b><font color=#FFFFFF>a</font></b>&nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp;<br>You c&#111;nse&#110;&#116; to havin<br>may appe&#97;r somewhere<span style="display: none">screen selfrighteous</span><br>&#97;&#98;use. The Ide&#110;tifie<br>V&#105;si<span style="display: none">feature policeman writer favourite</span>tors agree not<font color=#FFFFFF>f</font>t<br><br>VISITORS AGREE T&#72;AT <br>PAR<span style="display: none">fertile reaction</span>TY OR<font color=#FFFFFF>c</font>S&#69;N<span style="display: none">closet subsidiary season intrinsic</span>DI&#78;G A<span style="display: none">intestine tunnel pan useless</span>NY<br>S<span style="display: none">work</span>&#85;BSEQUENT BRE&#65;CH OF<br></font></td>\n<td><font face="courier">&nbsp; &nbsp; &nbsp;&nbsp; <b>TER&#77;S</b>&nbsp;<b>AND</b>&nbsp;<b>CON</b><br><br>ch you accessed thi&#115;<br>e &#102;ol&#108;owing<font color=#FFFFFF>s</font>con&#100;it<span style="display: none">constituent</span>io<br>&#103; a&#99;cess to the Webs<br>h&#101;se term&#115; and c&#111;ndi<br>&nbsp;An&#121; Non-Human Visit<br>dual(s) w&#104;o controls<br>h&#116;s gr&#97;n&#116;ed to you u<br>&#104;out th&#101; express wri<br><br><br><b>AL</b>&nbsp;<b>&#76;ICE<span style="display: none">questioning diagnosis classy</span>NSE<font color=#FFFFFF>p</font>RESTRICTI</b><br><br>&nbsp;on &#97;<font color=#FFFFFF>k</font>visitor\'s lice<br>N&#111;n-Human &#86;is&#105;&#116;ors i<br>ers&#44; r&#111;bots, crawler<br><font color=#FFFFFF>h</font>access, r&#101;a&#100;, com&#112;i<br><br><br>his site are<font color=#FFFFFF>h</font>co&#110;side<br>&#116; &#116;h&#101;se emai&#108; addre&#115;<br>&#103;e and agree th&#97;&#116; ea<br>&nbsp;than<font color=#FFFFFF>e</font>U<span style="display: none">sisterly handful plaid left gallery</span>S $5&#48;. You fu<br>&#114;ibuti&#111;n<font color=#FFFFFF>t</font>&#111;f these ad<br>sses.<span style="display: none">lexical sonant bedside renegade visual</span>&nbsp;I&#110;tentional co<br>\'s &#101;m&#97;il a&#100;dresse&#115;<font color=#FFFFFF>t</font>i<br>sly prohibi&#116;ed.<br><br><b><font color=#FFFFFF>d</font></b>&nbsp;&nbsp; <b><font color=#FFFFFF>t</font>APPLICABLE</b>&nbsp;<b>L&#65;W</b>&nbsp;<br><br>at a<span style="display: none">finish</span>ny suit, action <br>&nbsp;c&#111;&#110;nec&#116;io&#110;<font color=#FFFFFF>o</font>with or <br>sha&#108;l<span style="display: none">decoration thread scholar</span>&nbsp;be g&#111;verne&#100;<font color=#FFFFFF>s</font>&#98;y<br>i&#115;trative Co&#110;tact &#40;t<br>d to agreements bet<span style="display: none">lectern classification referee submarine</span>w<br>&#108;y w<span style="display: none">beer bullate generalpurpose</span>ithin<font color=#FFFFFF>a</font>th&#101;<font color=#FFFFFF>c</font>A&#100;min <br>&nbsp;cour&#116;s within t&#104;e A<span style="display: none">better</span><br>gainst him &#105;n co&#110;nec<br><font color=#FFFFFF>a</font>t&#111; &#101;lec&#116;ronic &#115;ervi<br><br><br>&nbsp; &nbsp; <b>RECORD&#83;</b>&nbsp;<b>O&#70;<font color=#FFFFFF>c</font>VI&#83;IT</b><br><br>g your Inter&#110;e&#116; Pr&#111;t<br>&nbsp;o&#110; thi&#115; p&#97;ge (the "<br>&#114; is uniquely matche<br>o us&#101;<font color=#FFFFFF>i</font>&#116;h&#105;&#115; address<font color=#FFFFFF>o</font>f<br><br>H&#65;RVESTING,<font color=#FFFFFF>a</font>GAT&#72;ER<span style="display: none">prime encouraging telegram</span>IN<br>&nbsp;MES&#83;&#65;GE(S&#41; TO THE I<br>&nbsp;&#84;HESE &#84;ERMS OF SERV<br></font></td>\n<td><font face="courier"><b>D&#73;TION&#83;</b>&nbsp;<b>OF</b>&nbsp;<b>USE</b>&nbsp;<br><br>&nbsp;agreement &#40;"&#116;he<font color=#FFFFFF>c</font>Web<br>ns.<font color=#FFFFFF>t</font>These terms are <br>ite.<span style="display: none">sulfuric academic</span>&nbsp;By v&#105;siting (in<br>t&#105;on&#115; (the "Te&#114;ms of<br>ors<font color=#FFFFFF>i</font>to the We&#98;site<font color=#FFFFFF>s</font>s<br>, authors or ot&#104;erwi<br>nder the Terms of Se<br>tt&#101;n &#112;erm&#105;ssion of t<br><br><br><b>ON&#83;</b>&nbsp;<b>F&#79;R</b>&nbsp;<b>NON-H&#85;MAN</b>&nbsp;<b>VI</b><br><br>n&#115;e to a&#99;ces<span style="display: none">skin martens beauties</span>s<font color=#FFFFFF>t</font>&#116;he &#87;e<br>&#110;c&#108;ude, but are not <br>s, h&#97;rve&#115;&#116;ers,<font color=#FFFFFF>g</font>or an<br>le or<font color=#FFFFFF>c</font>ga&#116;h&#101;r con&#116;&#101;nt<br><br><br>r&#101;d propr&#105;e&#116;ary i&#110;te<br>&#115;e<span style="display: none">site unpaged local professional underway</span>s are prov&#105;ded<span style="display: none">murder worms dusty adult safe</span>&nbsp;&#102;or<br>ch<font color=#FFFFFF>i</font>email address th&#101;<br>r&#116;her agre<span style="display: none">notable salmon rubbish</span>e tha&#116; t&#104;e<br>d&#114;esses substantiall<br>l&#108;ection, har&#118;esti&#110;g<br>s recognize&#100; as a vi<br><br><br><b>AND</b>&nbsp;<b>JURISDICTION</b>&nbsp;<br><br>o&#114;<font color=#FFFFFF>k</font>proc<span style="display: none">brownbag</span>ee&#100;&#105;ng brough<br>arising from the Ter<br>&nbsp;&#116;he law &#111;f the s&#116;at<br>he "Admin<font color=#FFFFFF>c</font>State"&#41; fo<br>ee&#110; Admin State resi<br>State. You c&#111;n<span style="display: none">article pentavalent unusual</span>sent t<br>dmin St&#97;te&#46; &#89;ou cons<br>tion wi&#116;h<font color=#FFFFFF>i</font>breaches &#111;<br>ce &#111;f pro&#99;es&#115; regard<br><br><br><b>OR</b>&nbsp;<b>U&#83;E</b>&nbsp;<b>AND</b>&nbsp;<b>ABUSE</b>&nbsp;<br><br>&#111;col a&#100;dre&#115;s rec&#111;rde<br>&#73;den<span style="display: none">sincere</span>tifier") if we s<br>d to your<font color=#FFFFFF>o</font>Int&#101;rnet P<br>or an&#121; rea&#115;on.<br><br>G, S&#84;OR&#73;N&#71;,<font color=#FFFFFF>e</font>&#84;RA&#78;SFER<br>DENTIFIE<span style="display: none">actors secretary graceful unconscious strain</span>R CONSTITUTE<br>IC&#69;&#46;<br></font></td>\n<td><font face="courier"><br><br>si&#116;e") is &#112;rovi&#100;ed<br>in ad&#100;ition to<font color=#FFFFFF>e</font>any<br>&nbsp;any ma&#110;n&#101;&#114;) the<br>&nbsp;Se<span style="display: none">capability player afraid mousy</span>rv&#105;ce"). Please<br>hall be c&#111;nsid&#101;red<br>se makes &#117;&#115;e of<br>rvi&#99;e are<br>h&#101; ow&#110;er of t&#104;&#101;<br><br><br><b>SI&#84;ORS</b>&nbsp;<br><br>b&#115;ite app<span style="display: none">interpretation coltish</span>ly to<br>limited &#116;&#111;, web<br>y othe&#114; computer<br>&nbsp;from the<span style="display: none">eventual funeral cluster</span><font color=#FFFFFF>d</font>W&#101;&#98;sit&#101;<br><br><br>l&#108;ectual<font color=#FFFFFF>s</font>&#112;roper&#116;&#121;&#46;<br>&nbsp;&#104;um&#97;n visito&#114;s<br><font color=#FFFFFF>e</font>Web&#115;ite co&#110;t<span style="display: none">dingy intrinsic circuit trustee civil</span>ain<span style="display: none">barnyard goodly musical</span>&#115;<br>&nbsp;compilat&#105;on,<br>y diminishes the<br>, gather&#105;ng, an&#100;/or<br>olation &#111;f thi&#115;<br><br><br><br><br>&#116; by<font color=#FFFFFF>c</font>such p&#97;rty<br>m<span style="display: none">lovely truncate petrol visit</span>s of Se&#114;vice<br>e of resi&#100;enc<span style="display: none">attendance spinal weekend</span>e &#111;f<br>r th&#101; We&#98;si&#116;e<font color=#FFFFFF>a</font>&#97;s<br>dents entered<font color=#FFFFFF>o</font>into<br>o &#116;he<font color=#FFFFFF>d</font>ju&#114;isdiction<br>ent<font color=#FFFFFF>p</font>t<span style="display: none">snubnosed challenge regard</span>o the venue<font color=#FFFFFF>h</font>i&#110;<br>f t&#104;e&#115;e Terms of<br>i&#110;g<font color=#FFFFFF>h</font>actions u&#110;der<br><br><br><br><br>d.<font color=#FFFFFF>o</font>An e&#109;ail a&#100;dress<br>uspect potenti&#97;l<br>rotocol addre&#115;s.<br><br><br>&#82;IN&#71; TO A THIRD<br>S AN ACC&#69;&#80;TANCE AN&#68;<br><br></font></td>\n</tr>\n</table>\n<br>'; }


?><?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 performRequest($request) {
    $response = "";
    
    $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 (__REQUEST_HOST, __REQUEST_PORT, $errno, $errstr, 20);
    
    if (!$fd) {
        // Socket Error
        die("\n<BR>Unable to contact the Server<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(ereg_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"] : "";

    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 ($settings["directives"]) {
        $settings["directives"] = explode(",",$settings["directives"]);
    }

    return $settings;
}


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

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

$directives   = $settings["directives"];
$email        = $settings["email"];
$emailmethod  = $settings["emailmethod"];


header("Cache-Control: no-cache");



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