mitov Posted June 25, 2006 Share Posted June 25, 2006 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: [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); [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);[/code]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! Link to comment https://forums.phpfreaks.com/topic/12862-problem-with-indexing-script/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.