• 0

latest php


Question

Recommended Posts

  • 0

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

cal.jpg

some one posted the image for a samurize script..

Link to comment
Share on other sites

  • 0

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

  • 0
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

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

  • 0
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

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

  • 0

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

  • 0

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

test.php :blink:

Link to comment
Share on other sites

  • 0
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

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.