How to make a dynamic signature (IP sig)
#21
Posted 05 June 2005 - 06:24 AM
===================
[1] Within your account in public_html folder or the directory where the script is no longer working you may find a .htaccess. If not you may need to create a .htaccess file.
[2] Open this file up or create it and add:
php_value register_globals 1
===================
#22
Posted 05 June 2005 - 06:34 AM
XPerties, on Jun 5 2005, 08:24 AM, said:
===================
[1] Within your account in public_html folder or the directory where the script is no longer working you may find a .htaccess. If not you may need to create a .htaccess file.
[2] Open this file up or create it and add:
php_value register_globals 1
===================
<{POST_SNAPBACK}>
No go. I just tried this on another site, to post the .jpg as just that, and it's not being parsed right at all...
#24
Posted 05 June 2005 - 03:10 PM
#25
Posted 05 June 2005 - 03:56 PM
#27
Posted 21 June 2005 - 11:44 PM
So i am guessing its because of the GD plugin. Can u help me. THanks
#28
Posted 17 August 2005 - 03:33 AM
"<b>Fatal error</b>: Call to undefined function: imagettftext() in <b>/usr/local/xxx/home/vhosts/xxx.com/httpdocs/sig/test.jpg</b> on line <b>133</b><br />"
#29
Posted 31 August 2005 - 02:16 AM

I tried this tutorial but cant get it to work....
When i used the zip files all i got was a red x where pic should be,so tried with my own graphic but no joy.....
My sig
Heres my code,
<?php
Header ('Content-type: image/jpeg');
Header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
Header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');
Header('Pragma: no-cache');
// create the image using your own background
$image = imagecreatefromjpeg("background.jpg");
// dimensions of the image used
$img_width = 380;
$img_height = 50;
// set the colours
$cool = imagecolorallocate($image, 81, 86, 96);
$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 the font and print text
$font = 'verdana.ttf';
// now i will create a line with font size 8, with no angle, 10 pixels to the right, and 17 pixels down
ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR);
// the above will display your IP address
// output and destroy
imagepng($image);
imagedestroy($image);
?>
Do you just upload the fonts from your windows fonts folder?
#30
Posted 31 August 2005 - 04:35 AM
theodonnells, on Aug 31 2005, 09:16 AM, said:

I tried this tutorial but cant get it to work....
When i used the zip files all i got was a red x where pic should be,so tried with my own graphic but no joy.....
My sig
Heres my code,
[code here]
Do you just upload the fonts from your windows fonts folder?
<{POST_SNAPBACK}>
The erroryou are getting now I used to get until I setup .htaccess correctly
Pretty simple to do when you have it setup right (I killed my host setting up GD2 not knowing I already had it installed
http://www.psychoman.../test/mysig.png
#31
Posted 01 November 2005 - 02:32 PM
Ive been learning php and mysql for a few months now and altho they say its easy its pretty comprehensive to say the least, php.net proves that!
Would it be possible to add another couple of lines to this code so it could show other stuff? what would be the code to use to display the uptime of my pc/cpu?
also id like to be able to incorporate other things into it like what youre currently playing in winamp by using something like AMIP dynamic sig.
i think you need to play around with the function calc_uptime() as ive been using ampsig.com's ampsig. http://ampsig.com and its all in the code.
ive been playing around with some various scripts over the last few days as, ultimately what id like to create is one mutiple stat'd sig.
heres my attempt at using the code from here > [multisig] - A work in progress LOL
Id like to be able to merge it with something like this: [AMIP_sig]
[Here] is the sigamp sig by the way.
I like it and all and you can use your own images and totally tweek it but for some parts it needs a MYSQL table and i want to try and keep it as simple as possible.
well thanks for any insite anyone
Brazen1
This post has been edited by Brazen1: 01 November 2005 - 07:47 PM
#32
Posted 02 November 2005 - 05:51 AM
Brazen1, on Nov 1 2005, 10:32 PM, said:
Firefox not detected
change
elseif ( strstr($agent, "Firebird") ) $browser = "using Firebird";
to this
elseif ( strstr($agent, "Firefox") ) $browser = "using Firefox";
#34
Posted 01 December 2005 - 03:12 PM
#35
Posted 17 December 2005 - 12:04 PM
Edit:
Btw, for those who might have problems with the signature, a admin of my hosting fixed my .htaccess file for me:
#<Files mysig.jpg> #ForceType application/x-httpd-php #</Files> #These lines should have caused the error. AddHandler application/x-httpd-php .jpg
Edit2: found out how to add $endos
// now i will create a line with font size 8, with no angle, 10 pixels to the right, and 17 pixels down ImageTTFText ($image, 8, 0, 10, 17, $white, $font,"Your IP Address is ".$REMOTE_ADDR. " and you are using ".$endos);
I would like to know how I can break lines, like you do with the html tag <br />, but that doesn't work...
This post has been edited by Martijn: 10 February 2006 - 08:47 AM
#36
Posted 17 July 2006 - 08:26 PM
Martijn, on Dec 17 2005, 02:04 PM, said:
Edit:
Btw, for those who might have problems with the signature, a admin of my hosting fixed my .htaccess file for me:
#<Files mysig.jpg> #ForceType application/x-httpd-php #</Files> #These lines should have caused the error. AddHandler application/x-httpd-php .jpg
Edit2: found out how to add $endos
// now i will create a line with font size 8, with no angle, 10 pixels to the right, and 17 pixels down ImageTTFText ($image, 8, 0, 10, 17, $white, $font,"Your IP Address is ".$REMOTE_ADDR. " and you are using ".$endos);
I would like to know how I can break lines, like you do with the html tag <br />, but that doesn't work...
It might be a bit late for an answer, but you can put in a line break by adding this to your text within the quotation marks: \n
If anyone is still interested in this type of signature, view mine below, and any and all questions will be answered to fit everyone's needs.
#37
Posted 05 August 2006 - 04:37 PM
First off, install the beta version of Hamachi (v1.0.0.0 or whatever), and make sure that you set the following as shown:
hamachiweb.JPG (27.03K)
Number of downloads: 42
Now, you need to put in the following in your GD image's code in order for it to work:
<?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 1981 08:52:00 GMT');
Header('Pragma: no-cache');
// create the image
$image = imagecreatefrompng("signew.png"); // my background image
// hamachi online status
$fileget = file_get_contents("http://my.hamachi.cc/status/text.php?5.x.x.x"); // replace 5.x.x.x with your hamachi ip
if( preg_match( "/online/i", $fileget ) ) {
$status = imagecreatefrompng("online.png");
}elseif( preg_match( "/offline/i", $fileget ) ) {
$status = imagecreatefrompng("offline.png");
}else{
$status = imagecreatefrompng("unknown.png");
}
$status_x = imagesx($status);
$status_y = imagesy($status);
// put it all together
// starting out with the status
imagecopymerge($image, $status, 287, 3, 0, 0, $status_x, $status_y,100);
// and the text
/////////////// i dont have any in my sig
// output and destroy
imagepng($image);
imagedestroy($image);
imagedestroy($status);
?>
That's all there is to it! The end result is something that looks like what's in my sig, in the top right-hand corner!
For a list of all your computers' Hamachi online statuses, refer to this: http://www.astromike.../hamachistatus/
Attached File(s)
-
images.zip (1.84K)
Number of downloads: 39
#39
Posted 05 August 2006 - 07:45 PM
#40
Posted 06 August 2006 - 08:25 AM



Help

Back to top









