MSFN Forum: How to make a dynamic signature (IP sig) - MSFN Forum

Jump to content


  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • You cannot start a new topic
  • You cannot reply to this topic

How to make a dynamic signature (IP sig) Rate Topic: -----

#21 User is offline   XPerties 

  • MSFN OG Senior
  • Group: Patrons
  • Posts: 2,994
  • Joined: 18-August 01
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 05 June 2005 - 06:24 AM

If I might add, the server you are on has register_globals=off which might be causing an issue. It did for a few clients of mine. Here is a walk around to make sure it isn't....

===================
[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 User is offline   Cyberpawz 

  • Newbie
  • Group: Members
  • Posts: 21
  • Joined: 25-May 05

Posted 05 June 2005 - 06:34 AM

XPerties, on Jun 5 2005, 08:24 AM, said:

If I might add, the server you are on has register_globals=off which might be causing an issue. It did for a few clients of mine. Here is a walk around to make sure it isn't....

===================
[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...

#23 User is offline   tj007s13 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 06-March 05

Posted 05 June 2005 - 03:05 PM

i made one...

Posted Image

#24 User is offline   tj007s13 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 06-March 05

Posted 05 June 2005 - 03:10 PM

now...u said screen resolution could only be done by incorporating javascript in right? How would i go about doing that?

#25 User is offline   gamehead200 

  • SEARCH!!! SEARCH!!!
  • Group: Super Moderator
  • Posts: 7,036
  • Joined: 02-September 02
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 05 June 2005 - 03:56 PM

You can't really put someone's resolution in a signature without having them go to another site to store it in a cookie. :)

#26 User is offline   tj007s13 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 06-March 05

Posted 05 June 2005 - 07:11 PM

ohhh... darn...

#27 User is offline   megafan 

  • Group: Members
  • Posts: 1
  • Joined: 21-June 05

Posted 21 June 2005 - 11:44 PM

Hey how do u install the GD plugin? After uploading u'r sample thsi is what I am getting http://govinda.us/sig/mysig.jpg

So i am guessing its because of the GD plugin. Can u help me. THanks

#28 User is offline   SoKoOLz 

  • Group: Members
  • Posts: 9
  • Joined: 23-February 05

Posted 17 August 2005 - 03:33 AM

I have verys trange problem, when I have created my sig. It works perfectly on my test server(with Appserv installed). But when I put it on my host, it the forced me to download the image instead of showing the image. With an error inside saying that
"<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 User is offline   theodonnells 

  • Group: Members
  • Posts: 1
  • Joined: 30-August 05

Posted 31 August 2005 - 02:16 AM

Posted Image
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 User is offline   SuperBleeder 

  • Group: Members
  • Posts: 1
  • Joined: 04-August 05

Posted 31 August 2005 - 04:35 AM

theodonnells, on Aug 31 2005, 09:16 AM, said:

Posted Image
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 :P

Pretty simple to do when you have it setup right (I killed my host setting up GD2 not knowing I already had it installed :lol: )

http://www.psychoman.../test/mysig.png

;):P

#31 User is offline   Brazen1 

  • Group: Members
  • Posts: 8
  • Joined: 01-March 05

Posted 01 November 2005 - 02:32 PM

This is great, a fantastic starting off script for anyone interested in learning php, like me, thanks for posting it :D
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 :thumbup

Brazen1

This post has been edited by Brazen1: 01 November 2005 - 07:47 PM


#32 User is offline   Bas 

  • I. V.
  • Pip
  • Group: Members
  • Posts: 77
  • Joined: 02-July 05
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 02 November 2005 - 05:51 AM

View PostBrazen1, on Nov 1 2005, 10:32 PM, said:

heres my attempt at using the code from here > [multisig] - A work in progress LOL

Firefox not detected
change
elseif ( strstr($agent, "Firebird") ) $browser = "using Firebird";

to this
elseif ( strstr($agent, "Firefox") ) $browser = "using Firefox";


#33 User is offline   Mamoun 

  • MSFN forever!
  • Pip
  • Group: Members
  • Posts: 75
  • Joined: 23-May 05

Posted 18 November 2005 - 11:34 AM

Hii
How can I put a script in my dynamic signature, like a script to get a number from an asp page, for example this one.

#34 User is offline   tj007s13 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 06-March 05

Posted 01 December 2005 - 03:12 PM

is there a different way to get the ISP besides gethostaddr? I get some IP4 and IP6 error if i use the gethostaddr command...???

#35 User is offline   Martijn 

  • It's-a-me, Mario!
  • PipPipPipPip
  • Group: Members
  • Posts: 524
  • Joined: 28-July 04

Posted 17 December 2005 - 12:04 PM

I would like my sig to output the browser and OS but I don't understand how to put this code in my sig, it is working but where do I add for instance $endos ?

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 User is offline   gamehead200 

  • SEARCH!!! SEARCH!!!
  • Group: Super Moderator
  • Posts: 7,036
  • Joined: 02-September 02
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 17 July 2006 - 08:26 PM

View PostMartijn, on Dec 17 2005, 02:04 PM, said:

I would like my sig to output the browser and OS but I don't understand how to put this code in my sig, it is working but where do I add for instance $endos ?

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. :D

#37 User is offline   gamehead200 

  • SEARCH!!! SEARCH!!!
  • Group: Super Moderator
  • Posts: 7,036
  • Joined: 02-September 02
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 05 August 2006 - 04:37 PM

Anyone ever wanted to add their computer's online status to their sig using Hamachi? Here's my way of doing it:

First off, install the beta version of Hamachi (v1.0.0.0 or whatever), and make sure that you set the following as shown:

Attached File  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! :D The required images are attached!

For a list of all your computers' Hamachi online statuses, refer to this: http://www.astromike.../hamachistatus/

:D

Attached File(s)



#38 User is offline   tain 

  • Cyber Ops
  • Group: Super Moderator
  • Posts: 3,557
  • Joined: 24-September 05
  • OS:none specified
  • Country: Country Flag

Posted 05 August 2006 - 04:39 PM

Nice. Thanks for posting this info :thumbup

#39 User is offline   gamehead200 

  • SEARCH!!! SEARCH!!!
  • Group: Super Moderator
  • Posts: 7,036
  • Joined: 02-September 02
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 05 August 2006 - 07:45 PM

No problem. Hopefully it works as expected. I was in a rush when writing that down. :P

#40 User is offline   tain 

  • Cyber Ops
  • Group: Super Moderator
  • Posts: 3,557
  • Joined: 24-September 05
  • OS:none specified
  • Country: Country Flag

Posted 06 August 2006 - 08:25 AM

Yup, it works! I am changing the code around a bit and playing with some other ideas. Thanks!

Share this topic:


  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy