Location: PHPKode > scripts > WereProxy > wereproxy/super/supercaptcha.php
<?php
/*
	Copyright 2010 Ping Shin Ching (hide@address.com)

	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
	You may obtain a copy of the License at

		http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.
	
	Project Mugatiya: mugatiya.wordpress.com
 */


/*
 * File to store the human confirmed IPs 
 */
 $checkhumanfilename="humanorbot.txt";
 
 
 /*
 * The remote address. The outgoing IP of the proxy server
 */
 $outgoingip = "127.0.0.1";
 
 
 /*
  * reCaptcha public key
  */
 $publickey = "6LftpL4SAAAAAHOsawrAtiG_2Msz3kPQDhtDugZY"; 
 
 
 /*
  * reCaptcha private key
  */
 $privatekey = "6LftpL4SAAAAACUHX69lmh4d2EbhprQ07tRVkovo";
 
 
 /*
  * Flag the ip as human
  */
 function iamhuman($ip){
 	global $checkhumanfilename;
	$f = fopen($checkhumanfilename, 'a+'); 
	fwrite($f, "$ip\n");
	fclose($f);
 }
 
 
 /*
  * Check if the ip is registered as human. 
  */
 function checkifhuman($ip){
 	global $checkhumanfilename;
	if(($f = fopen($checkhumanfilename, 'r'))!==FALSE){
	 	while(!feof($f)){
			$s=fgets($f, 64);
			if(strstr($s, $ip)!==FALSE){
				fclose($f);
				return TRUE;		
			}
 		}
 		fclose($f);
	}
 	return FALSE;
 }
 ?>
Return current item: WereProxy