20) {
$return[‘title_class’] = ‘Very Good’;
$return[‘title_color’] = ‘cc3300’;
}
elseif($return[‘title_perc’]>0) {
$return[‘title_class’] = ‘Good’;
$return[‘title_color’] = ‘ff9933’;
}
elseif($return[‘title_perc’]>-20) {
$return[‘title_class’] = ‘Bad’;
$return[‘title_color’] = ‘339900’;
}
else {
$return[‘title_class’] = ‘Very Bad’;
$return[‘title_color’] = ‘006699’;
}

$return[‘desc_diff’] = $return[‘desc’]-299;
$return[‘desc_perc’] = ($return[‘desc_diff’]/299)*100;
$return[‘desc_diff’] = round($return[‘desc_diff’], 2);
$return[‘desc_perc’] = round($desc_perc, 2);

if($return[‘desc_perc’]>20) {
$return[‘desc_class’] = ‘Very Good’;
}
elseif($return[‘desc_perc’]>0) {
$return[‘desc_class’] = ‘Good’;
}
elseif($return[‘desc_perc’]>-20) {
$return[‘desc_class’] = ‘Bad’;
}
else {
$return[‘desc_class’] = ‘Very Bad’;
}

return $return;
}

function clean($word) {
$word = strtolower($word);
$word = str_replace(‘.’, ”, $word);
$word = str_replace(‘,’, ”, $word);
$word = str_replace(‘”‘, ”, $word);
$word = str_replace(‘.’, ”, $word);
$word = str_replace(‘:’, ”, $word);
$word = str_replace(‘;’, ”, $word);
return $word;
}

if($_GET[‘title’]) {
$title = $_GET[‘title’];
$title_value = $title;
$words = split(” “, $title);
$count= count($words);
foreach($words as $word) {
$word = clean($word);
$word_data[$word] = laf1($word);
if($word_data[$word][‘title_diff’]==-299) {
$table_display .= ”

No Data Available on $word.

“;
$sentance_display .= ““.$word.” “;
}
else {
$total = $total+$word_data[$word][‘title’];
$sentance_display .= ““.$word.” “;

if($word_data[$word][‘title_diff’]>0) { $disp_data = $word_data[$word][‘title_perc’].”% more links than the average.”;}
else { $disp_data = $word_data[$word][‘title_perc’].”% less links than the average”; }

$table_display .= ”

$word     “.$word_data[$word][‘title_class’].”   “.$disp_data.” 

“;
}
}
}
else {
$title_value = ‘Your Title’;
}
echo ‘Enter a title and the tool will breakdown the words and display the effect they had on the link accumulation of popular Digg stories. Or you can check a specific keyword’s effect with the keyword tool. This tool has also been released as an API and a WordPress plugin.

‘;
if($title) {
$average = $total/$count;
$title_diff = $average-299;
$title_perc = ($title_diff/299)*100;

if($title_perc>20) {
$title_class = ‘Very Good’;
$title_color = ‘cc3300’;
}
elseif($title_perc>0) {
$title_class = ‘Good’;
$title_color = ‘ff9933’;
}
elseif($title_perc>-20) {
$title_class = ‘Bad’;
$title_color = ‘339900’;
}
else {
$title_class = ‘Very Bad’;
$title_color = ‘006699’;
}

if($title_perc>0) {
$l_disp = “more”;
}
else {
$l_disp = “less”;
}
echo ““.$sentance_display.”
“;
echo “

“.$table_display.”

This title has a “.$title_class.” overall effect of “.round($title_perc, 2).”% “.$l_disp.” links than the average.
“;

if($title_perc>100) {$title_perc_s=100; } else {$title_perc_s=round($title_perc,0); }
$title_offset = $title_perc_s*1.8;
$title_offset=$title_offset+180;

$title_offset = round($title_offset, 0);

echo ““;
echo “

“;
}
?>