Hiya everyone,
I need some serius help.
i have a php script which indexes my website. The problem is that it indexes EVERYTHING including unwanted things like my html menu. This means that when i search, it is displayed....
The file which controls the indexing is the class.index php file. In it, i have this:
Quote:
CODE// Has this page got any script tags?
while(preg_match('%<script[^>]*>.*?</script>%is', $pageData, $ignore_matches)) {
$pageData = str_replace($ignore_matches[0], '', $pageData);
}
unset($ignore_matches);
// Only grab the contents of the page body and then
// strip out any script tags
eregi("(<body[^>]*>.*</body>)", $pageData, $bodyArray);
if (sizeof($bodyArray) > 0) {
$strippedPageData = strip_tags($bodyArray[1]);
} else {
$strippedPageData = '';
}
unset($bodyArray);
|
The bolded is what i think i need to change. I tried adding <spider></spider> tags to my page, and changed body to spider in the script, but it still dosent work.
Any help will be gratley appreciated! Any ides on how i can get the script to index the contant between the <spider></spider> tags only?
THANK YOU VERY MUCH FOR ALL YOUR HELP!