Paieška

FDisk (2009-07-14 16:07:31 ) :: keywords generator

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<form action="" method="post">
<input type="text" name="page" value="http://" />
<input type="submit" /> 
</form>
<?php

/******************************************************************
Projectname:   Automatic Keyword Generator
Version:       0.2
Author:        Ver Pangonilo <smp_AT_itsp.info>
Last modified: 21 July 2006
Copyright (C): 2006 Ver Pangonilo, All Rights Reserved

* GNU General Public License (Version 2, June 1991)
*
* This program is free software; you can redistribute
* it and/or modify it under the terms of the GNU
* General Public License as published by the Free
* Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License
* for more details.

Description:
This class can generates automatically META Keywords for your
web pages based on the contents of your articles. This will
eliminate the tedious process of thinking what will be the best
keywords that suits your article. The basis of the keyword
generation is the number of iterations any word or phrase
occured within an article.

This automatic keyword generator will create single words,
two word phrase and three word phrases. Single words will be
filtered from a common words list.

Change Log:
===========
0.2 Ver Pangonilo - 22 July 2005
================================
Added user configurable parameters and commented codes
for easier end user understanding.

0.3 Vasilich  (vasilich_AT_grafin.kiev.ua) - 26 July 2006
=========================================================
Added encoding parameter to work with UTF texts, min number 
of the word/phrase occurrences, 

******************************************************************/

class autokeyword {

    
//declare variables
    //the site contents
    
var $contents;
    var 
$encoding;
    
//the generated keywords
    
var $keywords;
    
//minimum word length for inclusion into the single word
    //metakeys
    
var $wordLengthMin;
    var 
$wordOccuredMin;
    
//minimum word length for inclusion into the 2 word
    //phrase metakeys
    
var $word2WordPhraseLengthMin;
    var 
$phrase2WordLengthMinOccur;
    
//minimum word length for inclusion into the 3 word
    //phrase metakeys
    
var $word3WordPhraseLengthMin;
    
//minimum phrase length for inclusion into the 2 word
    //phrase metakeys
    
var $phrase2WordLengthMin;
    var 
$phrase3WordLengthMinOccur;
    
//minimum phrase length for inclusion into the 3 word
    //phrase metakeys
    
var $phrase3WordLengthMin;

    function 
autokeyword($params$encoding) {
        
//get parameters
        
$this->encoding $encoding;
        
mb_internal_encoding($encoding);
        
$this->contents $this->replace_chars($params['content']);

        
// single word
        
$this->wordLengthMin $params['min_word_length'];
        
$this->wordOccuredMin $params['min_word_occur'];

        
// 2 word phrase
        
$this->word2WordPhraseLengthMin $params['min_2words_length'];
        
$this->phrase2WordLengthMin $params['min_2words_phrase_length'];
        
$this->phrase2WordLengthMinOccur $params['min_2words_phrase_occur'];

        
// 3 word phrase
        
$this->word3WordPhraseLengthMin $params['min_3words_length'];
        
$this->phrase3WordLengthMin $params['min_3words_phrase_length'];
        
$this->phrase3WordLengthMinOccur $params['min_3words_phrase_occur'];

        
//parse single, two words and three words

    
}

    function 
get_keywords() {
        
$keywords $this->parse_words() . $this->parse_2words() . $this->parse_3words();
        
$keywords array_unique(explode(' ',$keywords));
        
//$keywords = mb_substr($keywords, 0, 230, 'utf-8');
        
        
return implode(', ',$keywords);
    }

    
//turn the site contents into an array
    //then replace common html tags.
    
function replace_chars($content) {
        
//convert all characters to lower case
        
$content mb_strtolower($content);
        
//$content = mb_strtolower($content, "UTF-8");
        
$content strip_tags($content);

        
$punctuations = array("\r\n""\n"'&nbsp;''gettime''http'"document""write""unescape""script""protocol""location"'&quot''&raquo''%3e''%3c''&nbsp;''|'','')''(''.'"'"'"''<''>'';''!''?''/''-''_''['']'':''+''=''#''$''&quot;''&copy;''&gt;''&lt;'chr(10), chr(13), chr(9));

        
$content str_replace($punctuations" "$content);
        
// replace multiple gaps
        
$content preg_replace('/ {2,}/si'" "$content);

        return 
$content;
    }

    
//single words META KEYWORDS
    
function parse_words() {
        
//list of commonly used words
        // this can be edited to suit your needs
        
$common = array("able""about""above""act""add""afraid""after""again""against""age""ago""agree""all""almost""alone""along""already""also""although""always""am""amount""an""and""anger""angry""animal""another""answer""any""appear""apple""are""arrive""arm""arms""around""arrive""as""ask""at""attempt""aunt""away""back""bad""bag""bay""be""became""because""become""been""before""began""begin""behind""being""bell""belong""below""beside""best""better""between""beyond""big""body""bone""born""borrow""both""bottom""box""boy""break""bring""brought""bug""built""busy""but""buy""by""call""came""can""cause""choose""close""close",
            
"consider""come""consider""considerable""contain""continue""could""cry""cut""dare""dark""deal""dear""decide""deep""did""die""do""does""dog""done""doubt""down""during""each""ear""early""eat""effort""either""else""end""enjoy""enough""enter""even""ever""every""except""expect""explain""fail""fall""far""fat""favor""fear""feel""feet""fell""felt""few""fill""find""fit""fly""follow""for""forever""forget""from""front""gave""get""gives""goes""gone""good""got""gray""great""green""grew""grow""guess""had""half""hang""happen""has""hat""have""he""hear""heard""held""hello""help""her""here""hers""high""hill""him""his",
            
"hit""hold""hot""how""however""I""if""ill""in""indeed""instead""into""iron""is""it""its""just""keep""kept""knew""know""known""late""least""led""left""lend""less""let""like""likely""likr""lone""long""look""lot""make""many""may""me""mean""met""might""mile""mine""moon""more""most""move""much""must""my""near""nearly""necessary""neither""never""next""no""none""nor""not""note""nothing""now""number""of""off""often""oh""on""once""only""or""other""ought""our""out""please""prepare""probable""pull""pure""push""put""raise""ran""rather""reach""realize""reply""require""rest""run""said""same""sat""saw""say",
            
"see""seem""seen""self""sell""sent""separate""set""shall""she""should""side""sign""since""so""sold""some""soon""sorry""stay""step""stick""still""stood""such""sudden""suppose""take""taken""talk""tall""tell""ten""than""thank""that""the""their""them""then""there""therefore""these""they""this""those""though""through""till""to""today""told""tomorrow""too""took""tore""tought""toward""tried""tries""trust""try""turn""two""under""until""up""upon""us""use""usual""various""verb""very""visit""want""was""we""well""went""were""what""when""where""whether""which""while""white""who""whom""whose""why""will""with""within",
            
"without""would""yes""yet""you""young""your""br""img""p""lt""gt""quot""copy""Akmenė""Alytus""Anykščiai""Ariogala""Baltoji""Vokė""Birštonas""Biržai""Daugai""Druskininkai""Dusetos""Dūkštas""Eišiškės""Elektrėnai""Ežerėlis""Gargždai""Garliava""Gelgaudiškis""Grigiškės""Ignalina""Jieznas""Jonava""Joniškis""Joniškėlis""Jurbarkas""Kaišiadorys""Kalvarija""Kaunas""Kavarskas""Kazlų""Rūda""Kelmė""Klaipėda""Kretinga""Kudirkos""Naumiestis""Kupiškis""Kuršėnai""Kybartai""Kėdainiai""Lazdijai""Lentvaris""Linkuva""Marijampolė""Mažeikiai""Molėtai""Naujoji""Akmenė""Nemenčinė""Neringa""Neringos""sav.""Obeliai""Pabradė""Pagėgiai""Pakruojis""Palanga""Pandėlys""Panemunė",
            
"Panevėžys""Pasvalys""Plungė""Priekulė""Prienai""Radviliškis""Ramygala""Raseiniai""Rietavas""Rokiškis""Rūdiškės""Salantai""Seda""Simnas""Skaudvilė""Skuodas""Smalininkai""Subačius""Tauragė""Telšiai""Trakai""Troškūnai""Tytuvėnai""Ukmergė""Utena""Užventis""Vabalninkas""Varniai""Varėna""Veisiejai""Venta""Viekšniai""Vievis""Vilkaviškis""Vilkija""Vilnius""Virbalis""Visaginas""Zarasai""Šakiai""Šalčininkai""Šeduva""Šiauliai""Šilalė""Šilutė""Širvintos""Švenčionys""Švenčionėliai""Žagarė""Žiežmariai""-------------""Germany""Ireland""Lietuva""Russian""Federation""Spain""United""Kingdom""United""States""Lietuva""United""States""United""Kingdom""Russian""Federation",
            
"Spain""Germany""Ireland""-------------""Afghanistan""Albania""Algeria""American""Samoa""Andorra""Angola""Anguilla""Antarctica""Antigua""And""Barbuda""Argentina""Armenia""Aruba""Australia""Austria""Azerbaijan""Bahamas""Bahrain""Bangladesh""Barbados""Belarus""Belgium""Belize""Benin""Bermuda""Bhutan""Bolivia""Bosnia""And""Herzegowina""Botswana""Bouvet""Island""Brazil""British""Indian""Ocean""Territory""Brunei""Darussalam""Bulgaria""Burkina""Faso""Burundi""Cambodia""Cameroon""Canada""Cape""Verde""Cayman""Islands""Central""African""Republic""Chad""Chile""China""Christmas""Island""Cocos""(Keeling)""Islands""Colombia""Comoros""Congo""Cook""Islands",
            
"Costa""Rica""Cote""D'Ivoire""Croatia""Cuba""Cyprus""Czech""Republic""Denmark""Djibouti""Dominica""Dominican""Republic""East""Timor""Ecuador""Egypt""El""Salvador""Equatorial""Guinea""Eritrea""Estonia""Ethiopia""Falkland""Islands""Faroe""Islands""Fiji""Finland""France""France,""Metropolitan""French""Guiana""French""Polynesia""French""Southern""Territories""Gabon""Gambia""Georgia""Ghana""Gibraltar""Greece""Greenland""Grenada""Guadeloupe""Guam""Guatemala""Guinea""Guinea-Bissau""Guyana""Haiti""Heard""And""Mc""Donald""Islands""Honduras""Hong""Kong""Hungary""Iceland""India""Indonesia""International""Iran""Iraq""Israel""Italy""Jamaica""Japan",
            
"Jordan""Kazakhstan""Kenya""Kiribati""Kuwait""Kyrgyzstan""Lao""People's""Republic""Latvia""Lebanon""Lesotho""Liberia""Libyan""Arab""Jamahiriya""Liechtenstein""Luxembourg""Macau""Macedonia""Madagascar""Malawi""Malaysia""Maldives""Mali""Malta""Marshall""Islands""Martinique""Mauritania""Mauritius""Mayotte""Mexico""Micronesia""Moldova""Monaco""Mongolia""Montserrat""Morocco""Mozambique""Myanmar""Namibia""Nauru""Nepal""Netherlands""Netherlands""Antilles""New""Caledonia""New""Zealand""Nicaragua""Niger""Nigeria""Niue""Norfolk""Island""North""Korea""Northern""Mariana""Islands""Norway""Oman""Pakistan""Palau""Panama""Papua""New""Guinea""Paraguay""Peru",
            
"Philippines""Pitcairn""Poland""Portugal""Puerto""Rico""Qatar""Reunion""Romania""Rwanda""Saint""Kitts""And""Nevis""Saint""Lucia""Saint""Vincent""And""The""Grenadin""Samoa""San""Marino""Sao""Tome""And""Principe""Saudi""Arabia""Senegal""Serbia""Seychelles""Sierra""Leone""Singapore""Slovakia""Slovenia""Solomon""Islands""Somalia""South""Africa""South""Georgia""And""The""South""Sa""South""Korea""Sri""Lanka""St""Helena""St""Pierre""and""Miquelon""Sudan""Suriname""Svalbard""And""Jan""Mayen""Islands""Swaziland""Sweden""Switzerland""Syrian""Arab""Republic""Taiwan""Tajikistan""Tanzania""Thailand""Togo""Tokelau""Tonga""Trinidad""And""Tobago",
            
"Tunisia""Turkey""Turkmenistan""Turks""And""Caicos""Islands""Tuvalu""Uganda""Ukraine""United""Arab""Emirates""United""States""Minor""Outlying""I""Uruguay""Uzbekistan""Vanuatu""Vatican""City""State""Venezuela""Viet""Nam""Virgin""Islands""(British)""Virgin""Islands""(U.S.)""Wallis""And""Futuna""Islands""Western""Sahara""Yemen""Zaire""Zambia""Zimbabwe");
        
$common mb_strtolower($common"utf-8");
        
//create an array out of the site contents
        
$s str_replace($common''$this->contents);
        
$s split(" "$this->contents);
        
//initialize array
        
$k = array();
        
//iterate inside the array
        
foreach ($s as $key => $val) {
            
//delete single or two letter words and
            //Add it to the list if the word is not
            //contained in the common words list.
            
if (mb_strlen(trim($val)) >= $this->wordLengthMin && !in_array(trim($val), $common) && !is_numeric(trim($val))) {
                
$k[] = trim($val);
            }
        }
        
//count the words
        
$k array_count_values($k);
        
//sort the words from
        //highest count to the
        //lowest.
        
$occur_filtered $this->occure_filter($k$this->wordOccuredMin);
        
arsort($occur_filtered);

        
$imploded $this->implode(" "$occur_filtered);
        
//release unused variables
        
unset($k);
        unset(
$s);

        return 
$imploded;
    }

    function 
parse_2words() {
        
//create an array out of the site contents
        
$x split(" "$this->contents);
        
//initilize array

        //$y = array();
        
for ($i 0$i count($x) - 1$i++) {
            
//delete phrases lesser than 5 characters
            
if ((mb_strlen(trim($x[$i])) >= $this->word2WordPhraseLengthMin) && (mb_strlen(trim($x[$i 1])) >= $this->word2WordPhraseLengthMin)) {
                
$y[] = trim($x[$i]) . " " trim($x[$i 1]);
            }
        }

        
//count the 2 word phrases
        
$y array_count_values($y);

        
$occur_filtered $this->occure_filter($y$this->phrase2WordLengthMinOccur);
        
//sort the words from highest count to the lowest.
        
arsort($occur_filtered);

        
$imploded $this->implode(" "$occur_filtered);
        
//release unused variables
        
unset($y);
        unset(
$x);

        return 
$imploded;
    }

    function 
parse_3words() {
        
//create an array out of the site contents
        
$a split(" "$this->contents);
        
//initilize array
        
$b = array();

        for (
$i 0$i count($a) - 2$i++) {
            
//delete phrases lesser than 5 characters
            
if ((mb_strlen(trim($a[$i])) >= $this->word3WordPhraseLengthMin) && (mb_strlen(trim($a[$i 1])) > $this->word3WordPhraseLengthMin) && (mb_strlen(trim($a[$i 2])) > $this->word3WordPhraseLengthMin) && (mb_strlen(trim($a[$i]) . trim($a[$i 1]) . trim($a[$i 2])) > $this->phrase3WordLengthMin)) {
                
$b[] = trim($a[$i]) . " " trim($a[$i 1]) . " " trim($a[$i 2]);
            }
        }

        
//count the 3 word phrases
        
$b array_count_values($b);
        
//sort the words from
        //highest count to the
        //lowest.
        
$occur_filtered $this->occure_filter($b$this->phrase3WordLengthMinOccur);
        
arsort($occur_filtered);

        
$imploded $this->implode(" "$occur_filtered);
        
//release unused variables
        
unset($a);
        unset(
$b);

        return 
$imploded;
    }

    function 
occure_filter($array_count_values$min_occur) {
        
$occur_filtered = array();
        foreach (
$array_count_values as $word => $occured) {
            if (
$occured >= $min_occur) {
                
$occur_filtered[$word] = $occured;
            }
        }

        return 
$occur_filtered;
    }

    function 
implode($gule$array) {
        
$c "";
        foreach (
$array as $key => $val) {
            @
$c .= $key $gule;
        }
        return 
$c;
    }
    
    function 
content() {
        return 
$this->contents;
    }
}

/******************************************************************
Projectname:   Autolink Keywords Application Script 1
Version:       0.1
Author:        Ver Pangonilo <smp@limbofreak.com>
Last modified: 05 January 2007
Copyright (C): 2007 Ver Pangonilo, All Rights Reserved

* GNU General Public License (Version 2, June 1991)
*
* This program is free software; you can redistribute
* it and/or modify it under the terms of the GNU
* General Public License as published by the Free
* Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License
* for more details.

Description:
============
Note: This class uses the output Automatic Keyword Generator.

This class can automatically create keywords link within an articles
if the keyword is found on a predetermined list of linked words.

The predetermined list could contain words and links to other
websites like advertisers or simply a link to other articles
in within your website.

Replacement Type:
=================
Since the autokeyword generator class produces only lower case words
and phrases, this example uses  Case Sensitive string replacement.
******************************************************************/

if (isset($_POST) && !empty($_POST['page']) && $_POST['page'] != 'http://') {

    
$data file_get_contents($_POST['page']);
    
$data preg_replace('%<script[^>]*>(.*?)</script>%si'''$data);
    
$data preg_replace('%<style[^>]*>(.*?)</style>%si'''$data);
    
$data trim(strip_tags($data));
    
$data trim(preg_replace('/\[(.*)\]/i'''$data));
    
$data trim(preg_replace('/\B"\b([^"\x84\x93\x94\r\n]+)\b"\B/''\1'$data)); //Quates

    
$search = array('&laquo'"  "' '"&nbsp;"'|'"\t"',');
    
$data trim(str_replace($search' '$data));

    
$data mb_strtolower($data"utf-8");

    
//$data = preg_replace('/[\W]/m', "\n", $data);

    //$data = trim(preg_replace('/^[ \t]*$/m', '', $data));    //remove blank lines
    
$data preg_replace("`\s+`""\n"$data);
    
//$data = preg_replace("/\n+/s","\n",$data);
    
    
$common = array("Akmenė""Alytus""Anykščiai""Ariogala""Baltoji""Vokė""Birštonas""Biržai""Daugai""Druskininkai""Dusetos""Dūkštas""Eišiškės""Elektrėnai""Ežerėlis""Gargždai""Garliava""Gelgaudiškis""Grigiškės""Ignalina""Jieznas""Jonava""Joniškis""Joniškėlis""Jurbarkas""Kaišiadorys""Kalvarija""Kaunas""Kavarskas""Kazlų""Rūda""Kelmė""Klaipėda""Kretinga""Kudirkos""Naumiestis""Kupiškis""Kuršėnai""Kybartai""Kėdainiai""Lazdijai""Lentvaris""Linkuva""Marijampolė""Mažeikiai""Molėtai""Naujoji""Akmenė""Nemenčinė""Neringa""Neringos""sav.""Obeliai""Pabradė""Pagėgiai""Pakruojis""Palanga""Pandėlys""Panemunė",
    
"Panevėžys""Pasvalys""Plungė""Priekulė""Prienai""Radviliškis""Ramygala""Raseiniai""Rietavas""Rokiškis""Rūdiškės""Salantai""Seda""Simnas""Skaudvilė""Skuodas""Smalininkai""Subačius""Tauragė""Telšiai""Trakai""Troškūnai""Tytuvėnai""Ukmergė""Utena""Užventis""Vabalninkas""Varniai""Varėna""Veisiejai""Venta""Viekšniai""Vievis""Vilkaviškis""Vilkija""Vilnius""Virbalis""Visaginas""Zarasai""Šakiai""Šalčininkai""Šeduva""Šiauliai""Šilalė""Šilutė""Širvintos""Švenčionys""Švenčionėliai""Žagarė""Žiežmariai""-------------""Germany""Ireland""Lietuva""Russian""Federation""Spain""United""Kingdom""United""States""Lietuva""United""States""United""Kingdom""Russian""Federation",
    
"Spain""Germany""Ireland""Afghanistan""Albania""Algeria""American""Samoa""Andorra""Angola""Anguilla""Antarctica""Antigua""And""Barbuda""Argentina""Armenia""Aruba""Australia""Austria""Azerbaijan""Bahamas""Bahrain""Bangladesh""Barbados""Belarus""Belgium""Belize""Benin""Bermuda""Bhutan""Bolivia""Bosnia""And""Herzegowina""Botswana""Bouvet""Island""Brazil""British""Indian""Ocean""Territory""Brunei""Darussalam""Bulgaria""Burkina""Faso""Burundi""Cambodia""Cameroon""Canada""Cape""Verde""Cayman""Islands""Central""African""Republic""Chad""Chile""China""Christmas""Island""Cocos""(Keeling)""Islands""Colombia""Comoros""Congo""Cook""Islands",
    
"Costa""Rica""Cote""D'Ivoire""Croatia""Cuba""Cyprus""Czech""Republic""Denmark""Djibouti""Dominica""Dominican""Republic""East""Timor""Ecuador""Egypt""El""Salvador""Equatorial""Guinea""Eritrea""Estonia""Ethiopia""Falkland""Islands""Faroe""Islands""Fiji""Finland""France""France,""Metropolitan""French""Guiana""French""Polynesia""French""Southern""Territories""Gabon""Gambia""Georgia""Ghana""Gibraltar""Greece""Greenland""Grenada""Guadeloupe""Guam""Guatemala""Guinea""Guinea-Bissau""Guyana""Haiti""Heard""And""Mc""Donald""Islands""Honduras""Hong""Kong""Hungary""Iceland""India""Indonesia""International""Iran""Iraq""Israel""Italy""Jamaica""Japan",
    
"Jordan""Kazakhstan""Kenya""Kiribati""Kuwait""Kyrgyzstan""Lao""People's""Republic""Latvia""Lebanon""Lesotho""Liberia""Libyan""Arab""Jamahiriya""Liechtenstein""Luxembourg""Macau""Macedonia""Madagascar""Malawi""Malaysia""Maldives""Mali""Malta""Marshall""Islands""Martinique""Mauritania""Mauritius""Mayotte""Mexico""Micronesia""Moldova""Monaco""Mongolia""Montserrat""Morocco""Mozambique""Myanmar""Namibia""Nauru""Nepal""Netherlands""Netherlands""Antilles""New""Caledonia""New""Zealand""Nicaragua""Niger""Nigeria""Niue""Norfolk""Island""North""Korea""Northern""Mariana""Islands""Norway""Oman""Pakistan""Palau""Panama""Papua""New""Guinea""Paraguay""Peru",
    
"Philippines""Pitcairn""Poland""Portugal""Puerto""Rico""Qatar""Reunion""Romania""Rwanda""Saint""Kitts""And""Nevis""Saint""Lucia""Saint""Vincent""Grenadin""Samoa""Marino""Principe""Saudi""Arabia""Senegal""Serbia""Seychelles""Sierra""Leone""Singapore""Slovakia""Slovenia""Solomon""Islands""Somalia""South""Africa""South""Georgia""South""Korea""Sri""Lanka""Helena""Pierre""Miquelon""Sudan""Suriname""Svalbard""And""Jan""Mayen""Islands""Swaziland""Sweden""Switzerland""Syrian""Arab""Republic""Taiwan""Tajikistan""Tanzania""Thailand""Togo""Tokelau""Tonga""Trinidad""And""Tobago",
    
"Tunisia""Turkey""Turkmenistan""Turks""And""Caicos""Islands""Tuvalu""Uganda""Ukraine""United""Arab""Emirates""United""States""Minor""Outlying""Uruguay""Uzbekistan""Vanuatu""Vatican""City""State""Venezuela""Viet""Nam""Virgin""Islands""(British)""Virgin""Islands""(U.S.)""Wallis""And""Futuna""Islands""Western""Sahara""Yemen""Zaire""Zambia""Zimbabwe");
    
$common array_unique($common);
    
    
$common mb_strtolower(implode(' ',$common), "utf-8");
    

    
//create an array out of the site contents
    
$data str_replace(explode(' ',$common), ''$data);



    
//echo "<pre>$data</pre>";

    /**********************************************
    This is the automatice keyword generator class
    ***********************************************/

    //this the actual application.

    
echo "<H1>Keywords:</H1>";
    
//echo $data;
    
$params['content'] = $data//page content

    //set the length of keywords you like
    
$params['min_word_length'] = 5//minimum length of single words
    
$params['min_word_occur'] = 2//minimum occur of single words
    
$params['min_2words_length'] = 5//minimum length of words for 2 word phrases
    
$params['min_2words_phrase_length'] = 10//minimum length of 2 word phrases
    
$params['min_2words_phrase_occur'] = 2//minimum occur of 2 words phrase
    
$params['min_3words_length'] = 5//minimum length of words for 3 word phrases
    
$params['min_3words_phrase_length'] = 10//minimum length of 3 word phrases
    
$params['min_3words_phrase_occur'] = 2//minimum occur of 3 words phrase


    
$keyword = new autokeyword($params"utf-8");

    
$keywords $keyword->get_keywords();

    echo 
$keywords;
    echo 
"<h1>Content</h1>";
    echo 
$keyword->content();
}

?>

Rašyti komentarą

Prašome prisijungti!

Komentarai

# zlotas (2010-04-24 15:20:36 )
avataras
žinau tai .. tiesiog skubėt nemoku :)
# FDisk (2010-04-24 01:11:01 )
avataras
Kita karta prasyciau trumpesnius komentarus rasyt. Uztenka ir vienos eilutes su klaidos pranesimu.
# zlotas (2010-04-23 17:29:39 )
avataras
Viskas tvarkoi :D jį reikia imest į puslapių papkę ir ijunkti :)
# FDisk (2009-07-14 21:30:44 )
avataras
Galima ir paprasciau bet kiek bandziau nesigavo
# FDisk (2009-07-14 16:08:22 )
avataras
Toks visokio mėšlo kratinys, kuris ivestos svetainės keywordus parenka. Atseit geriausi ir labiausiai atitinkantys turinį raktažodžiai :)