Web Analytics Made Easy -
StatCounter HELP: Search Result display - CodingForum

Announcement

Collapse
No announcement yet.

HELP: Search Result display

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HELP: Search Result display

    I would like my search results to display the data from my description metadata. The current coding displays the first few lines of the webpage. Is there any way to make the results display the metadata?

    All help appreciated!

    PHP Code:

    function s_print_title_desc($file_n) {
     
    $file = @file($file_n);
     if (
    $file) {
      
    $line_complete implode(''$file);
      
    eregi("<title>(.*)</title>"$line_complete$out);
      
    $title trim($out[1]);
      if(isset(
    $title)&&strlen($title)>0$line_complete str_replace($title""$line_complete);
      
    $line_complete strip_tags($line_complete);
      
    $line_complete trim($line_complete);
      
    $line_complete trim(substr($line_complete0400));

      echo 
    "<li><b><a href=\"$file_n\">";
      if (isset(
    $title)&&strlen($title)>0)
       echo 
    "$title</a></b><br><u>$file_n</u>";
      else
       echo 
    "$file_n</a></b>";
       echo 
    "<br>$line_complete...\n<br>&nbsp;"
     }
     else {
      echo 
    "<li><a href=\"$file_n\"><b>$file_n</b></a><br>...";
     }


  • #2
    I suppose you'll find this function helpful:
    De gustibus non est disputandum.

    Comment

    Working...
    X