13-06-2007, 11:02
|
|
|
חבר מתאריך: 13.12.01
הודעות: 475
|
|
צריך עזרה בGD יצירת תמונה מקוד PHP
יש לי את הדבר הבא:
http://home.muler.co.il/22.php?date=10/08/07
אני רוצה ליצור מזה תמונה כדי שאם אני אשתמש ב img src יראו את זה
הקוד שמפעיל:
קוד PHP:
<html> <head> </head> <body> <?php $rel_date=$_GET['date']; $all_date=explode ('/',$rel_date); $day =$all_date['0']; $month =$all_date['1']; $year =$all_date['2']; $today = mktime(0, 0, 0, date("m") , date("d"), date("Y")); $birthday = mktime(0, 0, 0, $month , $date, $year); $till =($birthday-$today)/86400; $percent = round((100-($till/365)*100),2); echo " <table style='border:2px ridge orange'> <tr><td width=200px style='text-align:center;border-bottom:1px ridge black' >עוד $till ימים עד היומהולדת</td></tr> <tr><td style='text-align:center'>$rel_date</td></tr> <tr><td style='border:1px ridge black;background-color:silver'><div style='background-color:red;width:$percent%;color:white;text-align:center'>$percent%</div></td></tr> </table>"; ?> </body> </html>
|