PHP Classes

PHP Text Spinner: Change words of a text with synonyms

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 40%Total: 2,342 All time: 1,664 This week: 673Up
Version License PHP version Categories
php-text-spinner 1Free For Educatio...4Text processing, SEO
Description 

Author

This class can be used to change words of a text with synonyms.

It can extract the words from a text and send requests to the FreeThesaurus.net site to obtain alternatives for the text words.

The class can replace the original words with some of the retrieved alternative words to make the text look different.

Innovation Award
PHP Programming Innovation award nominee
May 2010
Number 5
When you have a page with text, sometimes it may be more interesting to rewrite that text, so it uses words that would make the page rank better in search engine results for certain searches.

This class can rewrite a page by replacing certain words with synonyms that may make the page rank better in search engine results.

Manuel Lemos
Picture of Er. Rochak Chauhan
  Performance   Level  
Name: Er. Rochak Chauhan is available for providing paid consulting. Contact Er. Rochak Chauhan .
Classes: 54 packages by
Country: India India
Age: 46
All time rank: 21 in India India
Week rank: 22 Down2 in India India Down
Innovation award
Innovation award
Nominee: 15x

Winner: 4x

Recommendations

What is the best PHP text spinner class?
Rewrite words to their synonyms

Example

<?php
$content
="WordPress has a mechanism for saving, updating, and retrieving individual, named pieces of data (options) in the WordPress database. Option values can be
strings, arrays, or PHP objects (they will be serialized, or converted to a string, before storage, and unserialized when retrieved). Option names are strings, and
they must be unique, so that they do not conflict with either WordPress or other Plugins."
;


$spinContent="WordPress has a {mechanism|mechanistic|medal|medallion|meddle|meddler|meddling|media|medial|median|} for {saving|saving clause|savings|savings and
loan association|savior|Savitar|savoir faire|savoir-faire|savor|savorless|} updating, and retrieving
{individual|individualism|individualist|individualistic|individuality|individualize|individually|indivisible|indocile|indocility|}
named pieces of data (options) in the WordPress database. Option values can be strings, arrays, or PHP objects (they will be serialized, or converted to a string, before
storage, and unserialized when retrieved). Option names are strings, and they must be unique, so that they do not conflict with either WordPress or other Plugins."
;


require(
"PhpTextSpinner.inc.php");
$phpTextSpinner=new PhpTextSpinner();

//$spinContent=$phpTextSpinner->spinContent($content);
$newContent=$phpTextSpinner->runTextSpinner($spinContent);

echo
"<div><h3>Original Content</h3>$content</div>";
echo
"<div><h3>Content After TextSpin</h3>$newContent</div>";
?>


  Files folder image Files (2)  
File Role Description
Accessible without login Plain text file example.php Example Example Script
Plain text file PhpTextSpinner.inc.php Class Class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:2,342
This week:0
All time:1,664
This week:673Up
User Ratings User Comments (5)
 All time
Utility:59%StarStarStar
Consistency:56%StarStarStar
Documentation:-
Examples:56%StarStarStar
Tests:-
Videos:-
Overall:40%StarStarStar
Rank:3748
 
Very nice.
7 years ago (Slawomir Wlasik)
70%StarStarStarStar
Nicely done, and easy to try.
8 years ago (Gerry Danen)
52%StarStarStar
The class doesn't come with a database or table of synonyms o...
8 years ago (fabio souto)
0%Star
The class doesn't come with a database or table of synonyms o...
8 years ago (fabio souto)
0%Star
Very useful for text treament
14 years ago (freedelta)
70%StarStarStarStar