• 0

.PHP in sig


Question

17 answers to this question

Recommended Posts

  • 0

No, actually I am just wondering if that is possible. Ok, i wanna put different pictures to my sig everyday. The filenames of the pictures are based on the date for instance, 03272003 and so on. so i just wonder how to do that

thx for help! :)

Link to comment
Share on other sites

  • 0

Use the following code: (some of it is pseudocode cause I'm in a hurry and don't have time to write it all)

<?

$imgname = "/home/noname/".date(DATE_PARAMS)."jpg"; //replace DATE_PARAMS with the string you need (and edit the path)

$img = ImageCreateFromJpeg($imgname);

header("Content-type: image/jpeg");

imagejpeg($img,'',100); //change the quality to lower if you want. default is 75

imagedestroy($img);

?>

or, if you don't need your image to be dynamic, you can save some processing time by just fopen()'ing the correct file and outputting it :)

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.