Rusty.Metal Posted April 24, 2003 Share Posted April 24, 2003 avatar :) Link to comment Share on other sites More sharing options...
0 Sn00pY Posted April 24, 2003 Share Posted April 24, 2003 no need to be rude...but...how pointless...you wrote PHP to change the pic according to date...not rocket science... Link to comment Share on other sites More sharing options...
0 mikey Posted April 25, 2003 Share Posted April 25, 2003 it looks like hes using php to generate a gif with a set background and usting the date(); function to do the month/day quite nice! Link to comment Share on other sites More sharing options...
0 uniacid Posted April 25, 2003 Share Posted April 25, 2003 yea I think thats nice also :) Link to comment Share on other sites More sharing options...
0 Clone5k Posted April 25, 2003 Share Posted April 25, 2003 Looks pretty nifty! How about providing the source so we can learn how to create one of our own... :D Link to comment Share on other sites More sharing options...
0 NetRyder Posted April 25, 2003 Share Posted April 25, 2003 Looks pretty nifty!How about providing the source so we can learn how to create one of our own... :D Ditto :) Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted April 25, 2003 Author Share Posted April 25, 2003 this is for the big one... (in my sig) <?php header("Content-type: image/jpeg"); $im = ImageCreateFromJpeg("cal.jpg"); $white = imagecolorallocate($im, 255,255,255); $black = imagecolorallocate($im, 0,0,0); $month = date("M"); $day = date("j"); imagettftext($im, 11, 0, 16, 44, $white, "/home/samuels/public_html/sigs/ariblk.ttf", "$month"); imagettftext($im, 38, 0, 27, 93, $black, "/home/samuels/public_html/sigs/ariblk.ttf", "$day"); imagejpeg($im); imagedestroy($im); ?> and the image some one posted the image for a samurize script.. Link to comment Share on other sites More sharing options...
0 NetRyder Posted April 25, 2003 Share Posted April 25, 2003 Nice! Thank you :) Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted April 25, 2003 Author Share Posted April 25, 2003 if you need any explnation of the code ask Link to comment Share on other sites More sharing options...
0 Clone5k Posted April 25, 2003 Share Posted April 25, 2003 Thanks! I haven't gotten into image creation with php yet. This should give me somewhere to start. :) Link to comment Share on other sites More sharing options...
0 uniacid Posted April 25, 2003 Share Posted April 25, 2003 thx :D Link to comment Share on other sites More sharing options...
0 uniacid Posted April 25, 2003 Share Posted April 25, 2003 hmm I tried it on my server and it doesn't work http://uniacid.sytes.net:8080/stuff/cam/test.php <?php header("Content-type: image/jpeg"); $im = ImageCreateFromJpeg("cal.jpg"); $white = imagecolorallocate($im, 255,255,255); $black = imagecolorallocate($im, 0,0,0); $month = date("M"); $day = date("j"); imagettftext($im, 11, 0, 16, 44, $white, "arial.ttf", "$month"); imagettftext($im, 38, 0, 27, 93, $black, "arial.ttf", "$day"); imagejpeg($im); imagedestroy($im); ?> I tried putting the full dir also for arial, I copied it over to the dir it's in Link to comment Share on other sites More sharing options...
0 Tim Dorr Veteran Posted April 25, 2003 Veteran Share Posted April 25, 2003 pfft. that's nothing... *points to sig* :p Link to comment Share on other sites More sharing options...
0 NetRyder Posted April 25, 2003 Share Posted April 25, 2003 pfft. that's nothing...*points to sig* :p Hehe ... show off :p Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted April 25, 2003 Author Share Posted April 25, 2003 hmm I tried it on my server and it doesn't workhttp://uniacid.sytes.net:8080/stuff/cam/test.php <?php ?header("Content-type: image/jpeg"); ? $im = ImageCreateFromJpeg("cal.jpg"); ? ?$white = imagecolorallocate($im, 255,255,255); ?$black = imagecolorallocate($im, 0,0,0); ? ?$month = date("M"); ?$day = date("j"); ? ?imagettftext($im, 11, 0, 16, 44, $white, "arial.ttf", ?"$month"); ?imagettftext($im, 38, 0, 27, 93, $black, "arial.ttf", ?"$day"); ? ?imagejpeg($im); ? ?imagedestroy($im); ?> I tried putting the full dir also for arial, I copied it over to the dir it's in http://uniacid.sytes.net:8080/stuff/cam/cal.gif you dident upload the image i attached (right click save as) then upload it to ur site $im = ImageCreateFromJpeg("cal.jpg"); that tell the php script to look for, and open cal.jpg then the rest of it is positioning the text on the image, generating it, and then destroy it.. Link to comment Share on other sites More sharing options...
0 mikey Posted April 25, 2003 Share Posted April 25, 2003 pfft. that's nothing...*points to sig* :p ive made one like yours, but its 38594 times better :p i just dont wanna show off, he he Link to comment Share on other sites More sharing options...
0 [pioneer] Posted April 25, 2003 Share Posted April 25, 2003 come on mikey let's see your code.... please.... Link to comment Share on other sites More sharing options...
0 uniacid Posted April 25, 2003 Share Posted April 25, 2003 hmm I tried it on my server and it doesn't workhttp://uniacid.sytes.net:8080/stuff/cam/test.php <?php ?header("Content-type: image/jpeg"); ? $im = ImageCreateFromJpeg("cal.jpg"); ? ?$white = imagecolorallocate($im, 255,255,255); ?$black = imagecolorallocate($im, 0,0,0); ? ?$month = date("M"); ?$day = date("j"); ? ?imagettftext($im, 11, 0, 16, 44, $white, "arial.ttf", ?"$month"); ?imagettftext($im, 38, 0, 27, 93, $black, "arial.ttf", ?"$day"); ? ?imagejpeg($im); ? ?imagedestroy($im); ?> I tried putting the full dir also for arial, I copied it over to the dir it's in http://uniacid.sytes.net:8080/stuff/cam/cal.gif you dident upload the image i attached (right click save as) then upload it to ur site $im = ImageCreateFromJpeg("cal.jpg"); that tell the php script to look for, and open cal.jpg then the rest of it is positioning the text on the image, generating it, and then destroy it.. I did put it in my server http://uniacid.sytes.net:8080/stuff/cam/cal.jpg http://uniacid.sytes.net:8080/stuff/cam/cal.jpg[/im:blink:> :blink: Link to comment Share on other sites More sharing options...
0 Tim Dorr Veteran Posted April 25, 2003 Veteran Share Posted April 25, 2003 take out this line: header("Content-type: image/jpeg"); then run it and see what it says at the top of the image (might only show up in mozilla/pheonix) Link to comment Share on other sites More sharing options...
0 uniacid Posted April 25, 2003 Share Posted April 25, 2003 I'll try it when I get home, at school right now :sleep: can't wait to get out :woot: Link to comment Share on other sites More sharing options...
0 uniacid Posted April 25, 2003 Share Posted April 25, 2003 alright I took out that line, but still get nothing :/ Link to comment Share on other sites More sharing options...
0 Tim Dorr Veteran Posted April 25, 2003 Veteran Share Posted April 25, 2003 does it say what the error is instead of saying the image has errors? Link to comment Share on other sites More sharing options...
0 uniacid Posted April 25, 2003 Share Posted April 25, 2003 no, just blank, also I'm running this on my personal server, running win2k3 server with apache. I just tried it on my other server and it works :blink: Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted April 25, 2003 Author Share Posted April 25, 2003 you have php installed WITH GD library on ur personal server ? Link to comment Share on other sites More sharing options...
0 uniacid Posted April 25, 2003 Share Posted April 25, 2003 you have php installed WITH GD library on ur personal server ? don't think so, how can I check? and where do I get it from, I installed apache/php with appserv (all in one app) Link to comment Share on other sites More sharing options...
0 uniacid Posted April 25, 2003 Share Posted April 25, 2003 well aaron? where do I get GD library from Link to comment Share on other sites More sharing options...
Question
Rusty.Metal
avatar :)
Link to comment
Share on other sites
44 answers to this question
Recommended Posts