02-06-06, 23:40
|
# 5
|
משתמש בעל גישה מוגבלת
|
ציטוט:
נכתב במקור על ידי BBman
למה אתה פשוט לא עושה כמו שאמרתי לך וזהו ?
אתה גם יכול לעשות את זה :
<?php
function utf8_strrev($str){
preg_match_all('/./us', $str, $ar);
return join('',array_reverse($ar[0]));
}
// create a 100*30 image
$im = imagecreatefromjpeg("שם התמונה");
$bg = imagecolorallocate($im, 255, 255, 255);
$textcolor = imagecolorallocate($im, 0, 0, 0);
$font = "arial.ttf";
$prcnt=$_POST['poll'];
switch($rnd)
{
case 1;
$prcnt="100%";
break;
case 2;
$prcnt="80%";
break;
case 3;
$prcnt="60%";
break;
case 4;
$prcnt="40%";
break;
case 5;
$prcnt="20%";
break;
case 6;
$prcnt="10%";
break;
}
$text="you addicted to x-trip by $prcnt percent";
$x=380;
$bbox=imagettfbbox(20, 0, $font, $text);
$textWidth = $bbox[2] - $bbox[0];
$x -= $textWidth;
$black="0, 0, 0";
imagettftext($im, 20, 0, $x, 87, $black, $font, $text);
// output the image
header("Content-type: image/png");
imagepng($im);
?>
|
זה מקולקל =]
|
|
|