View Single Post
ישן 31-05-10, 12:51   # 17
ShonLevi
חבר מתקדם
 
ShonLevi's Avatar
 
מיני פרופיל
תאריך הצטרפות: Nov 2008
הודעות: 384

ShonLevi לא מחובר  

אני מעתיק מהאתר של PHP.
זה ההגדרה:


<?php
header("Content-Type: image/png");
?>


אחריה יש לי את כל ה:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="he" lang="he" dir="rtl">
<head>
<title>My Pixels</title>
<meta http-equiv="content-type" content="text/html; charset=windows-1255" />
<link rel="stylesheet" type="text/css" href="css.css" />
</head>

ואז הBODY. עם כל התגיות והJS וכל השאר.
ואז באמצע הBODY אני פותח שוב:

<?php
$img = imagecreate(10, 10);
imagecolorallocate($img, 256, 256, 256);
$black = imagecolorallocate($img, 0, 0, 0);

function CreateColorHex($code, $img) {
return imagecolorallocate($img, hexdec(substr($code, 0, 2)), hexdec(substr($code, 2, 2)), hexdec(substr($code, 4, 2)));
}
imagepng($img);
?>



וזה פשוט מראה את כל הקוד:
http://biode.info/Pixel/build.php
__________________
🎧
  Reply With Quote