PHP Classes

File: sample_in_english

Recommend this page to a friend!
  Classes of arab sheybani   Smart Meta Generator   sample_in_english   Download  
File: sample_in_english
Role: Example script
Content type: text/plain
Description: smart_meta_Generator english_version sample
Class: Smart Meta Generator
Extract keywords from an HTML page
Author: By
Last change:
Date: 16 years ago
Size: 2,818 bytes
 

Contents

Class file image Download
<?php
 
$data
=<<<EOF
participation in the site.</h2></center>
<div class="box" style="background-color: rgb(220, 220, 224); padding-left: 4px; padding-right: 4px;"><p><b><img src="http://files.phpclasses.org/graphics/award-logo.gif" alt="Vote on PHP Programming Innovation award" width="95" align="left" height="99"><a href="http://www.phpclasses.org/vote.html" target="_blank">Vote on PHP Programming Innovation award</a></b></p>
<div>This <a href="http://www.phpclasses.org/award/innovation/" target="_blank">award</a> is an initiative meant to provide recognition to the authors that contribute with the most innovating classes.<br>
<br>
In the beginning of every month the nominees are announced on the <a href="http://www.phpclasses.org/vote.html" target="_blank">vote</a> page.<br>
<br>
In the following month, the authors of the most voted classes may win prizes provided by the following sponsors: <a href="http://www.nusphere.com/products/phped.htm" target="_blank">NuSphere</a>, <a href="http://www.activestate.com/Products/Komodo/" target="_blank">ActiveState</a>, <a href="http://www.zend.com/store/products/zend-studio.php" target="_blank">Zend</a>, <a href="http://www.scriptcase.net/" target="_blank">NetMake</a>, <a href="http://www.codegear.com/products/delphi/php" target="_blank">Codegear</a>, <a href="http://www.dwebpro.com/" target="_blank">Human Profile</a>, <a href="http://www.jcxsoftware.com/jcx/vsphp/home" target="_blank">JCX Software</a>, <a href="http://www.ip2location.net/ip-country-region-city.aspx" target="_blank">IP2Location</a>, <a href="http://www.oreilly.com/" target="_blank">O'Reilly</a>, <a href="http://www.apress.com/" target="_blank">Apress</a>, <a href="http://www.packtpub.com/books" target="_blank">Packt</a>, <a href="http://www.manning.com/" target="_blank">Manning</a>, <a href="http://www.phparch.com/" target="_blank">PHP Architect</a>.</div>

</div>
         
EOF;
 
include(
'class.en_metagen.php');

echo
"<H1>Input - Page</H1>";
?><div dir="ltr" > <?echo '<pre>';
echo
$data;
echo
'</pre>';?></div>
<hr>
<?
$params
['content'] = $data; //page content
//set the length of keywords you like
$params['min_word_length'] = 3; //minimum length of single words
$params['metakeyLengthMax'] = 35; //max in meta



$keyword = new metagen($params, "utf-8");
$keyword->firstCheck=array('آگهی','آگهي','تست');
echo
"<H1>Input - text after remove html tags</H1>";
?><div dir="ltr"> <?echo '<pre>';
echo
$keyword->body ;
echo
'</pre>';?></div><?
echo "<H1>Output - generated keywords</H1>";
?>
<pre >
&lt;<span class="start-tag">meta</span><span > name</span>=<span >&quot;keywords&quot; </span><span >content</span>=<span >&quot;<?= $keyword->keymetagen();?>&quot; </span><span ><span >/</span></span>&gt;
</pre>