'and operator', 'w_whole' => 'exact phrase', 'w_part' => 'or operator' define('SEARCH_DEFAULT_LIMIT',10); //results per page define('SPIDER_MAX_LIMIT',20); //max recurse levels in spider define('RESPIDER_LIMIT',5); //recurse respider limit for update define('LINKS_MAX_LIMIT',20); //max links per each level define('RELINKS_LIMIT',5); //recurse links limit for an update //for limit to directory, URL format must either have file at end or ending slash at end //e.g., http://www.domain.com/dirs/ (WITH ending slash) or http://www.domain.com/dirs/dirs/index.php define('LIMIT_TO_DIRECTORY',true); //limit index to given (sub)directory, no sub dirs of dirs are indexed define('LIMIT_DAYS',0); //default days before reindex a page define('SMALL_WORDS_SIZE',2); //words to not index - must be 2 or more define('MAX_WORDS_SIZE',50); // RH: was 30 //max word size define('PHPDIG_EXCLUDE_COMMENT',''); //comment to exclude a page part define('PHPDIG_INCLUDE_COMMENT',''); //comment to include a page part // must be on own lines in HTML source // text within comments not indexed // links within comments still indexed define('PHPDIG_DEFAULT_INDEX',false); //phpDig considers /index or /default //html, htm, php, asp, phtml as the //same as '/' define('ALLOW_RSS_FEED',false); // Do RSS and display link - if true, set rss dir to 777 $theenc = PHPDIG_ENCODING; // needs to be same encoding used in index $theurl = "http://www.phpdig.net/"; // site offering the RSS feed $thetitle = "PhpDig.net"; // title for site offering the RSS feed $thedesc = "PhpDig :: Web Spider and Search Engine"; // description of site offering the RSS feed $thedir = "./rss"; // the rss directory name, no ending slash $thefile = "search.rss"; // used in rss filenames define('PHPDIG_SESSID_REMOVE',true); // remove SIDS or vars from indexed URLS define('PHPDIG_SESSID_VAR','PHPSESSID,s'); // name of SID or variable to remove // can be 's' or comma delimited 's,id,var,foo,etc' define('APPEND_TITLE_META',false); //append title and meta information to results define('TITLE_WEIGHT',3); //relative title weight: APPEND_TITLE_META needs to be true define('CHUNK_SIZE',1024); //chunk size for regex processing define('SUMMARY_LENGTH',500); //length of results summary define('TEXT_CONTENT_PATH','text_content/'); //Text content files path define('CONTENT_TEXT',0); // RH: was 1 //Activates/deactivates the //storage of text content. define('PHPDIG_IN_DOMAIN',false); //allows phpdig jump hosts in the same //domain. If the host is "www.mydomain.tld", //domain is "mydomain.tld" define('PHPDIG_LOGS',true); //write logs define('SILENCE_404S',true); //silence 404 output define('TEMP_FILENAME_LENGTH',8); //filename length of temp files // if using external tools with extension, use 4 for filename of length 8 define('NUMBER_OF_RESULTS_PER_SITE',-1); //max number of results per site // use -1 to display all results define('USE_RENICE_COMMAND','1'); //use renice for process priority //---------EXTERNAL TOOLS SETUP // if set to true is_executable used - set to '0' if is_executable is undefined define('USE_IS_EXECUTABLE_COMMAND','0'); // RH: was 1 //use is_executable for external binaries // if set to true, full path to external binary required define('PHPDIG_INDEX_MSWORD',false); define('PHPDIG_PARSE_MSWORD','/usr/local/bin/catdoc'); define('PHPDIG_OPTION_MSWORD','-s 8859-1'); define('PHPDIG_INDEX_PDF',false); define('PHPDIG_PARSE_PDF','/usr/local/bin/pstotext'); define('PHPDIG_OPTION_PDF','-cork'); define('PHPDIG_INDEX_MSEXCEL',false); define('PHPDIG_PARSE_MSEXCEL','/usr/local/bin/xls2csv'); define('PHPDIG_OPTION_MSEXCEL',''); define('PHPDIG_INDEX_MSPOWERPOINT',false); define('PHPDIG_PARSE_MSPOWERPOINT','/usr/local/bin/ppt2text'); define('PHPDIG_OPTION_MSPOWERPOINT',''); //---------EXTERNAL TOOLS EXTENSIONS // if external binary is not STDOUT or different extension is needed // for example, use '.txt' if external binary writes to filename.txt define('PHPDIG_MSWORD_EXTENSION',''); define('PHPDIG_PDF_EXTENSION',''); define('PHPDIG_MSEXCEL_EXTENSION',''); define('PHPDIG_MSPOWERPOINT_EXTENSION',''); //---------FTP SETTINGS define('FTP_ENABLE',0);//enable ftp content for distant PhpDig define('FTP_HOST',''); //if distant PhpDig, ftp host; define('FTP_PORT',21); //ftp port define('FTP_PASV',1); //passive mode define('FTP_PATH',''); //distant path from the ftp root define('FTP_TEXT_PATH','text_content');//ftp path to text-content directory define('FTP_USER',''); define('FTP_PASS',''); //--------CRON SETTINGS define('CRON_ENABLE',false); define('CRON_EXEC_FILE','/usr/bin/crontab'); define('CRON_CONFIG_FILE',ABSOLUTE_SCRIPT_PATH.'/admin/temp/cronfile.txt'); define('PHPEXEC','/usr/local/bin/php'); // NOTE: make sure ABSOLUTE_SCRIPT_PATH is the full path up to but not including the admin dir, no ending slash // NOTE: CRON_ENABLE set to true writes a file at CRON_CONFIG_FILE containing the cron job information // The CRON_CONFIG_FILE must be 777 permissions if applicable to your OS/setup // You still need to call the CRON_CONFIG_FILE to run the cron job!!! // From shell: crontab CRON_CONFIG_FILE to set the cron job: replace CRON_CONFIG_FILE with actual file // From shell: crontab -l to list and crontab -d to delete // regular expression to ban useless external links in index define('BANNED','^ad\.|banner|doubleclick'); // regexp forbidden extensions - return sometimes text/html mime-type !!! define('FORBIDDEN_EXTENSIONS','\.(rm|ico|cab|swf|css|gz|z|tar|zip|tgz|msi|arj|zoo|rar|r[0-9]+|exe|bin|pkg|rpm|deb|bz2)$'); //----------HTML ENTITIES $spec = array( "&" => "&", "à" => "�", "è" => "�", "ù" => "�", "ó" => "�", "é" => "�", "î" => "�", "ô" => "�", "û" => "�", "ê" => "�", "ç" => "�", "œ" => "oe", ">" => " ", "<" => " ", "°" => " ", "&apos" => "'", """ => " ", "â" => "�", "ï" => "�", "ë" => "�", "ä" => "�", "Ä" => "�", "Ë" => "�", "Ï" => "�", "Ü" => "�", "ö" => "�", "ü" => "�", " " => " ", "ß" => "�", "í" => "�", "®" => " ", "©" => " ", "á" => "�", "Á" => "�", "ð" => "�", "Ð" => "�", "É" => "�", "Í" => "�", "Ó" => "�", "ú" => "�", "Ú" => "�", "Þ" => "�", "þ" => "�", "Ö" => "�", "æ" => "�", "&AELIG" => "�", "å" => "�", "Å" => "�", "ø" => "�", "Ø" => "�" ); //month names in iso dates $month_names = array ('jan'=>1, 'feb'=>2, 'mar'=>3, 'apr'=>4, 'may'=>5, 'jun'=>6, 'jul'=>7, 'aug'=>8, 'sep'=>9, 'oct'=>10, 'nov'=>11, 'dec'=>12 ); //apache multi indexes parameters $apache_indexes = array ( "?N=A" => 1, "?N=D" => 1, "?M=A" => 1, "?M=D" => 1, "?S=A" => 1, "?S=D" => 1, "?D=A" => 1, "?D=D" => 1, "?C=N&O=A" => 1, "?C=M&O=A" => 1, "?C=S&O=A" => 1, "?C=D&O=A" => 1, "?C=N&O=D" => 1, "?C=M&O=D" => 1, "?C=S&O=D" => 1, "?C=D&O=D" => 1); //includes language file define('PHPDIG_LANG_CONSTANT',$phpdig_language); // this line for classic if (is_file("$relative_script_path/locales/$phpdig_language-language.php")) { include "$relative_script_path/locales/$phpdig_language-language.php"; } elseif (is_file("$relative_script_path/locales/en-language.php")) { include "$relative_script_path/locales/en-language.php"; } else { die("Unable to select language pack.\n"); } //connection to database if ((!isset($no_connect)) || ($no_connect != 1)) { if (is_file("$relative_script_path/includes/connect.php")) { include "$relative_script_path/includes/connect.php"; } else { die("Unable to find connect.php file.\n"); } } //includes of libraries if (is_file("$relative_script_path/libs/phpdig_functions.php")) { include "$relative_script_path/libs/phpdig_functions.php"; } else { die ("Unable to find phpdig_functions.php file.\n"); } if (is_file("$relative_script_path/libs/function_phpdig_form.php")) { include "$relative_script_path/libs/function_phpdig_form.php"; } else { die ("Unable to find function_phpdig_form.php file.\n"); } if (is_file("$relative_script_path/libs/mysql_functions.php")) { include "$relative_script_path/libs/mysql_functions.php"; } else { die ("Unable to find mysql_functions.php file.\n"); } if ((!isset($template)) || ((!is_file($template)) && ($template != "array") && ($template != "classic"))) { die ("Unable to render template file.\n"); } if (!defined('CONFIG_CHECK')) { exit(); } // parse encodings (create global $phpdigEncode); phpdigCreateSubstArrays($phpdig_string_subst); // send encoding if needed if (!headers_sent()) { header('Content-type:text/html; Charset='.PHPDIG_ENCODING); } // turn off magic_quotes_runtime for escaping purposes @ini_set('magic_quotes_runtime',false); // turn off magic_quotes_sybase for escaping purposes @ini_set('magic_quotes_sybase',false); if ((!isset($no_connect)) || ($no_connect != 1)) { phpdigCheckTables($id_connect,array('engine', 'excludes', 'keywords', 'sites', 'spider', 'tempspider', 'logs', 'clicks', 'site_page', 'includes')); } ?>