Forex Glossary

 
 
"; ?>
"url" (path to directory and URL which corresponds to directory) //remember to include the trailing / on the URL $directories = array( "/home/forexglo/public_html/a/" => "http://www.forexglossary.com/a/", "/home/forexglo/public_html/b/" => "http://www.forexglossary.com/b/", "/home/forexglo/public_html/c/" => "http://www.forexglossary.com/c/", "/home/forexglo/public_html/d/" => "http://www.forexglossary.com/d/", "/home/forexglo/public_html/e/" => "http://www.forexglossary.com/e/", "/home/forexglo/public_html/f/" => "http://www.forexglossary.com/f/", "/home/forexglo/public_html/g/" => "http://www.forexglossary.com/g/", "/home/forexglo/public_html/h/" => "http://www.forexglossary.com/h/", "/home/forexglo/public_html/i/" => "http://www.forexglossary.com/i/", "/home/forexglo/public_html/j/" => "http://www.forexglossary.com/j/", "/home/forexglo/public_html/k/" => "http://www.forexglossary.com/k/", "/home/forexglo/public_html/l/" => "http://www.forexglossary.com/l/", "/home/forexglo/public_html/m/" => "http://www.forexglossary.com/m/", "/home/forexglo/public_html/n/" => "http://www.forexglossary.com/n/", "/home/forexglo/public_html/o/" => "http://www.forexglossary.com/o/", "/home/forexglo/public_html/p/" => "http://www.forexglossary.com/p/", "/home/forexglo/public_html/q/" => "http://www.forexglossary.com/q/", "/home/forexglo/public_html/r/" => "http://www.forexglossary.com/r/", "/home/forexglo/public_html/s/" => "http://www.forexglossary.com/s/", "/home/forexglo/public_html/t/" => "http://www.forexglossary.com/t/", "/home/forexglo/public_html/u/" => "http://www.forexglossary.com/u/", "/home/forexglo/public_html/v/" => "http://www.forexglossary.com/v/", "/home/forexglo/public_html/w/" => "http://www.forexglossary.com/w/", "/home/forexglo/public_html/x/" => "http://www.forexglossary.com/x/", "/home/forexglo/public_html/y/" => "http://www.forexglossary.com/y/", "/home/forexglo/public_html/z/" => "http://www.forexglossary.com/z/" ); //Filters for files that should not be included in search results //These must be set in a PERL style regex $filter = array( "/^\.$/", //Filter out . file "/^\.\.$/", //Filter out .. file "/^\./" //Filter out Unix hidden files (anything that starts with .) ); /* Examples: To only display .htm or .html add "/[^(\.htm|\.html)]$/" //Filter out anything not ending in .htm or .html To prevent the script from scanning through gifs and jpgs add "/(\.gif|\.jpg)$/" //Filter out .gif and .jpg files */ // -- End Environment Variables -- // Function Check_Filter($filter,$filename) { //Checks filename against filters and returns true if no match $retVal = 1; for($i=0;$i(.+)|Ui", $contents, $regs ); $title = $regs[1]; //Use Filename if no Title Tag if(!$title) $title = $filename; //Remove HTML Tags before searching $search = array ("']*?>.*?'si", // Strip out javascript "'<[\/\!]*?[^<>]*?>'si", // Strip out html tags "'([\r\n])[\s]+'", // Strip out white space "'&(quot|#34);'i", // Replace html entities "'&(amp|#38);'i", "'&(lt|#60);'i", "'&(gt|#62);'i", "'&(nbsp|#160);'i", "'&(iexcl|#161);'i", "'&(cent|#162);'i", "'&(pound|#163);'i", "'&(copy|#169);'i"); $replace = array ("", " ", "\\1", "\"", "&", "<", ">", " ", chr(161), chr(162), chr(163), chr(169)); $contents = preg_replace ($search, $replace, $contents); $contents = preg_replace ("/\W/", " ", $contents); $contents = preg_replace ("/\s+/", " ", $contents); //Seperate Each Word into an Array Element and Compare to Keywords $contents = explode(" ", $contents); $j = 0; for($j = 0; $j < count($keywords); $j++) { for($k = 0; $k < count($contents); $k++) { //compare contents with each keyword if (!strcasecmp ($contents[$k], $keywords[$j])) { $match++; break; } } } if ($match == count($keywords) ) { $counter = count($retVal); $retVal[$counter][0] = $filename; $retVal[$counter][1] = $title; } } return $retVal; } // -- MAIN -- //Make sure keyword is present and contains at least one non-whitespace character if (isset($keyword) && preg_match("|\S+|",$keyword)) { $keywords = explode(" ", $keyword); $pages = array(); while (list ($key, $val) = each ($directories)) { $directory = $key; chdir($directory) or die("Directory $directory Not found"); $filenames = Get_Filenames($directory,$filter); $found = Keyword_Check($filenames,$keywords); //add any pages with keywords in current directory to array for($i = 0;$i < count($found); $i++) { $fileloc = "$val".$found[$i][0]; $counter = count($pages); $pages[$counter][0] = $fileloc; $pages[$counter][1] = $found[$i][1];; } } $numfound = count($pages); echo "
\n"; echo "$numfound pages matching your query were found"; echo "
"; for ($i = 0; $i < count($pages); $i++) { $fileloc = $pages[$i][0]; $title = $pages[$i][1]; echo "$title
"; } echo "
"; } if (!$parent) { ?>

About ForexGlossary
Forex Glossary - a unique guide for the study of foreign currency trading and investing, with an extensive range of definitions, cross-references between related terms, informative sidelights, hyperlinked keywords and numerous examples. The Forex Glossary currently contains 1200 terms relating to online currency trading, financial and investment and is regularly updated.



Forex Trading Software

Forex Trading Books Forex Trading SoftwareForex BrokersContact us© 2000-2005 ForexGlosary.com