View Single Post
Old 03-08-2012, 04:24 AM  
asdasd
So Fucking Banned
 
Industry Role:
Join Date: Feb 2005
Posts: 1,225
I will once I see google stop lying to me.
Basically pr0phet hit the nail on the head.
Two days earlier I did that search and went hmm.

The cause of the disparity is duplicated content.
So while I can't share the seo tip just yet I'll share this instead.

Code:
function spin($s){
	preg_match('#\{(.+?)\}#is',$s,$m);
	if(empty($m)) return $s;

	$t = $m[1];

	if(strpos($t,'{')!==false){
		$t = substr($t, strrpos($t,'{') + 1);
	}

	$parts = explode("|", $t);
	$s = preg_replace("+\{".preg_quote($t)."\}+is", $parts[array_rand($parts)], $s, 1);

	return spin($s);
}

//Example:
echo spin('{This|Here} is {some|a {little|wee} bit of} {example|sample} text.');
asdasd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote