Jump to content


Photo

Problem with indexing script


  • Please log in to reply
No replies to this topic

#1 mitov

mitov
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 25 June 2006 - 12:36 PM

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.... Have a look at [a href=\"http://hairandbeautypages.com/find/?query=hebe&type=advanced&searchType=2\" target=\"_blank\"]http://hairandbeautypages.com/find/?query=...ed&searchType=2[/a] (the first result).


The file which controls the indexing is the class.index php file. In it, i have this:

// 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);

                    [b]// Only grab the contents of the page body and then
                    // strip out any script tags
                    eregi("(<body[^>]*>.*</body>)", $pageData, $bodyArray); [/b]


                    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!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users