Help - Search - Members - Calendar
Full Version: Dynamic Signatures
MSFN Forums > The General Stuff > General Discussion

   
Google Internet Forums Unattended CD/DVD Guide
Liam Morgan
Just wondering how these signatures work. They say.. Your IP is: xx.xx.xx.xx etc. but they seem to be images wacko.gif

Liam
sven
you have an image create php code. it puts text over a specified image. this is one of mine that shows which itunes song is playing.

CODE
<?php

Header ('Content-type: image/png');
Header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
Header('Expires: Thu, 19 Nov 1990 08:52:00 GMT');
Header('Pragma: no-cache');

// create the image
$nameofimage = "now-playing.jpg"; //name of image
$image = imagecreatefromjpeg($nameofimage);

// set the colours
$cool = imagecolorallocate($image, 87, 87, 87);
$black = imagecolorallocate($image, 0, 0, 0);
$white = imagecolorallocate($image, 255, 255, 255);
$red = imagecolorallocate($image, 255, 0, 0);
$grey = imagecolorallocate($image, 204, 204, 204);
$green = imagecolorallocate($image, 206, 129, 18);
$blue = imagecolorallocate($image, 0, 0, 255);

// set iTunes file (or other information)
$fname = "CurrentSong.txt";
$songfile = fopen($fname, "r");
$artist = fgets($songfile);
if($artist != " ") {
$songname = fgets($songfile);
$song = "Playing: $songname by $artist";
}
else
$song = "No music is playing";
fclose($songfile);

// set the font
$font = '/font.ttf';

// put it all together
//puts text on the image, see bellow about variables
ImageTTFText ($image, 8, 0, 9, 20, $white, $font, $song);


// output and destroy
imagepng($image);
imagedestroy($image);

?>


imageTTFText
completed script example
Liam Morgan
oh right biggrin.gif. Thanks smile.gif

Liam
darph
thx

i just wonder my self many times how does it work smile.gif

so long

darph
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.