".$vararray[$a].": ".$val[$a]."";
};
$fulltext = $val[0]." ".$val[1];
$numbars = substr_count($fulltext, ' ')+1;
echo "Number of bars: ".$numbars." (number of words)
";
$width = $val[2];
$height = $val[3];
$sizes = array ();
$pixels = array ();
$colours = array ();
$counter = 0;
$colcount = 0;
$total = 0;
for ($a=0;$a<=strlen($fulltext);$a++){
$currentchar=strtolower($fulltext[$a]);
$counter+=ord($currentchar);
if ($currentchar=="a"||$currentchar=="e"||$currentchar=="i"||$currentchar=="o"||$currentchar=="u") {
$colcount+2;
} else {
$colcount++;
};
if ($currentchar==" ") {
$sizes[]=$counter;
$colours[]=abs($colcount);
$total+=$counter;
$counter=0;
$colcount=0;
};
};
$sizes[]=$counter;
$total+=$counter;
$colours[]=abs($colcount);
$counter=0;
$colcount=0;
echo "Sizes of bars- (ascii values of words)
";
for ($a=0;$a".$percent."%) [".$pix." pixels]";
$pixels[] = $pix;
};
echo "
";
echo "Total: ".$total." [".$counter." pixels]
";
echo "Colours- (number of consonents + (number of vowels) * 2 in each word +1 if the same as the previous colour)
";
for ($a=0;$a0){
if ($colours[$a]==$colours[$a-1]) {
$colours[$a]++;
};
};
echo " ".$colours[$a]." (".$names[$colours[$a]].")";
};
echo "
";
if ($val[4]=="gm") {
$filename="gmpins.png";
} else {
$filename="pins.png";
};
$im = @imagecreate($width , $height)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
$col=array();
$max=16;
for ($x=0;$x<$max;$x++) {
$col [$x] = imagecolorallocate($im, $reds[$x],$greens[$x],$blues[$x]);
$col [$x+$max] = imagecolorallocate($im, $reds[$x]-10,$greens[$x]-10,$blues[$x]-10);
$col [$x+$max+$max] = imagecolorallocate($im, $reds[$x]-20,$greens[$x]-20,$blues[$x]-20);
};
$newx2 = 0;
for ($a=0;$a0) {
$spacing = floor($width/$val[5]);
$maxheight = ($height/679);
$maxwidth = ($spacing/593);
if ($maxheight>$maxwidth) {
$ratio=$maxwidth;
} else {
$ratio=$maxheight;
};
$new_width = 593 * $ratio;
$new_height = 679 * $ratio;
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefrompng($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, 593, 679);
imagecolortransparent($image_p,imagecolorat($image_p,0,0));
for ($a=0;$a<$val[5];$a++){
$new_x=($width/2)+(($a-($val[5]/2))*$new_width);
$new_y=floor(($height/2)-($new_height/2));
imagecopymerge($im,$image_p,$new_x,$new_y,0,0,$new_width,$new_height,100);
};
};
imagepng($im,$randname);
imagedestroy($im);
echo "
";
};
?>
Back to Gamer Badges