What is Keyword Density and how to create a script in PHP?

前端 未结 5 1398
天命终不由人
天命终不由人 2020-12-08 17:52

I am working on a project where I have to find out the keyword density of thepage on the basis of URL of that page. I googled a lot but no help and scripts were found, I fou

5条回答
  •  旧巷少年郎
    2020-12-08 18:43

    Or you can try this: http://code.eyecatch-up.de/?p=155
    Update: Relocated the class to http://code.google.com/p/php-class-keyword-density-check/

    domain = 'http://code.eyecatch-up.de';          // Define Domain
    print_r ($obj->result()); 
    ?>
    

    above code returns:

    Array
    (
        [0] => Array
            (
                [total words] => 231
            )
    
        [1] => Array
            (
                [keyword] => display
                [count] => 14
                [percent] => 6.06
            )
    and so on...
    

    works with local and remote files.

提交回复
热议问题