Warung Online
Headlines News :
mas template
Home » » Free PHP Article Spinner

Free PHP Article Spinner

Written By Trik Cari Duit on Minggu, 04 Desember 2011 | 03.36


It works just like The Best Spinner or Spinner Chief for taking an article spin and turning it into a finished spun article.
This code will allow you to use spun articles in your own programming. For instance, if you are writing your own software to send spun articles to wordpress blogs or bookmarking services … this function will enable your software to spin articles as it submits.
The Best Spinner has a port on it that people have to run it as a service so their software can receive spun text. The above function will allow you to bypass the need to do that, now you can spin right in your own programming.
I use it in software I’m writing to automatically generate articles and send them to wordpress blogs and social bookmarking. Anyone doing that sort of thing will find this function very helpful.
Just to be clear, this is not something made to replace The Best Spinner or Spinner Chief. Theoretically you could take this and hook a thesaurus up to it and some ajax to make your own versions of those software, but that’s not what I use it for. I simply use it to spin articles in my own programming code.
PHP Code:
function spin($pass){$mytext $pass;
while(
inStr("}",$mytext)){$rbracket strpos($mytext,"}",0);$tString substr($mytext,0,$rbracket);$tStringToken explode("{",$tString);$tStringCount count($tStringToken) - 1;$tString $tStringToken[$tStringCount];$tStringToken explode("|",$tString);$tStringCount count($tStringToken) - 1;$i rand(0,$tStringCount);$replace $tStringToken[$i];$tString "{".$tString."}";$mytext str_replaceFirst($tString,$replace,$mytext);
}
return 
$mytext;
}
function 
str_replaceFirst($s,$r,$str){$l strlen($str);$a strpos($str,$s);$b $a strlen($s);$temp substr($str,0,$a) . $r substr($str,$b,($l-$b));
return 
$temp;
}
function 
inStr($needle$haystack){
return @
strpos($haystack$needle) !== false;
}
Pass any block of text to the function “spin” and it will return your article, spun. Great for anyone who is developing their own system involving article spinning.
Supports nested spinning to infinite levels.
If you’re sending articleranks.com spins to it, just convert “[" and "]” to “{” “}” … and “~” to “|”.
Share this article :

0 komentar:

Speak up your mind

Tell us what you're thinking... !

Bisnis Hot
Bisnis Hot
 


Copyright © . Tips N Trik - All Rights Reserved
Proudly powered by Blogger