MSFN Forum: IP Sig - MSFN Forum

Jump to content


  • 8 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • This topic is locked

IP Sig how do u do it? Rate Topic: -----

#1 User is offline   eXPerience-XP 

  • The Offical MSFN Newbie
  • PipPipPip
  • Group: Members
  • Posts: 365
  • Joined: 23-September 03

Posted 25 September 2003 - 02:11 PM

I noticed that some ppl have a sig where theres an image and it shows the viewers IP and Operating system. Could someone show me how to do this?


#2 User is offline   XPerties 

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

Posted 25 September 2003 - 02:17 PM

I'm thinking this is in the WRONG section.

:)

#3 User is offline   Carmon 

  • MSFN's Local Mental Case
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,598
  • Joined: 08-June 03

Posted 25 September 2003 - 02:19 PM

Quote

XPerties Posted on Sep 25 2003, 09:17 PM
  I'm thinking this is in the WRONG section.


lol i been there dun dat lol :)

#4 User is offline   eXPerience-XP 

  • The Offical MSFN Newbie
  • PipPipPip
  • Group: Members
  • Posts: 365
  • Joined: 23-September 03

Posted 25 September 2003 - 02:24 PM

o sorry :)

#5 User is offline   DaveXP 

  • The One
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,295
  • Joined: 15-July 03

Posted 25 September 2003 - 02:30 PM

just take someone else saves time...lol

:)

#6 User is offline   Tinker 

  • "TINKER til ya fix it"
  • PipPipPipPip
  • Group: Members
  • Posts: 597
  • Joined: 13-May 02

Posted 26 September 2003 - 10:27 AM

Posted Image

Try here.......

:)

#7 User is offline   b0r3d 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 821
  • Joined: 03-August 03

Posted 26 September 2003 - 05:53 PM

Interesting ...

#8 User is offline   eXPerience-XP 

  • The Offical MSFN Newbie
  • PipPipPip
  • Group: Members
  • Posts: 365
  • Joined: 23-September 03

Posted 25 October 2003 - 11:20 AM

thx tinker i just saw ur reply now.. lol

#9 User is offline   gamehead200 

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

Posted 25 October 2003 - 02:43 PM

Well, first of all, you need about 3 files which contain the following:

.htaccess
<Files ipaddress.jpg>
ForceType application/x-httpd-php
</Files>


ipaddress.jpg
<?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');

// set the dimensions
$img_width = 240;
$img_height = 25;

// create the image
$image = imagecreate($img_width, $img_height);

// 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 background colour and border
imagefilledrectangle($image, 0, 0, $img_width, $img_height, $cool);

// set the font and print text
$font = '/path/to/your/ttf/font';

ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR);

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

?>


and your font file. I use Verdana...

If you continue playing on, you can put in a background color, pics, random text, etc. :)

Good luck! :rolleyes:

#10 User is offline   XPerties 

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

Posted 25 October 2003 - 04:04 PM

http://www.xperties.net/

yah and you get the sig like this on my frontpage. :)

#11 User is offline   Carmon 

  • MSFN's Local Mental Case
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,598
  • Joined: 08-June 03

Posted 25 October 2003 - 05:37 PM

:) looks very hard and confusing :rolleyes:

#12 User is offline   Thanatos 

  • GGTW
  • PipPip
  • Group: Members
  • Posts: 235
  • Joined: 31-August 03

Posted 27 October 2003 - 03:25 AM

The thing I don't get about those, is how do you use a custom image? I'm not too hot with php, but I can't see anything in that code which imports an image and overlays stuff onto it

#13 User is offline   XPerties 

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

Posted 27 October 2003 - 08:38 AM

Thanatos, on Oct 27 2003, 05:25 AM, said:

The thing I don't get about those, is how do you use a custom image? I'm not too hot with php, but I can't see anything in that code which imports an image and overlays stuff onto it

The php calls holders (images) which are png files. The actually image you see is actually the script but you place a htaccess file and within that you trick the server to think its a jpg instead of .php file.

#14 User is offline   gamehead200 

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

Posted 27 October 2003 - 03:18 PM

Thanatos, on Oct 27 2003, 05:25 AM, said:

The thing I don't get about those, is how do you use a custom image? I'm not too hot with php, but I can't see anything in that code which imports an image and overlays stuff onto it

You have to use different commands:

ipaddress.jpg
<?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("name-of-pic.png");

// 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 = '/path/to/your/ttf/font

ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR);

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

?>


#15 User is offline   tawxic 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 02-November 03

Posted 02 November 2003 - 06:30 PM

When I do this, it just shows me a blank page (both versions of scripts) - I think my hoster might be incompatible, but I don't know with what.. it can use PHP just fine... any suggestions? Here is what I have:

.htaccess :
Options None

<Limit GET POST>
order deny,allow
deny from all
allow from all
require group authors administrators
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthType Basic
AuthName www.phazm.net
AuthUserFile xxxx/service.pwd
AuthGroupFile xxxx/service.grp
<Files siggy.jpg>
ForceType application/x-httpd-php
</Files>

then in siggy.jpg I have:

<?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("bg.png");

// 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 = 'Arial.ttf'

ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR);

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

?>

then in bg.png I have a pure black BG,

and I have Arial.ttf in the same dir as everything else...

#16 User is offline   gamehead200 

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

Posted 02 November 2003 - 08:44 PM

Create a PHP file and put this in it:

<?php phpinfo(); ?>

Scroll down to see if GD is enabled, if it isn't, then that is probably your main problem! :)

And you shouldn't put anything else in the .htaccess file except for what I mentioned above! :rolleyes:

#17 User is offline   tawxic 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 02-November 03

Posted 04 November 2003 - 12:53 AM

http://www.phazm.net/phpinfo.php

GD is enabled :-/

and .htaccess is fine, I renamed the file to a .php (http://www.phazm.net/siggy.php) and it's just the red x :-/

#18 User is offline   tawxic 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 02-November 03

Posted 04 November 2003 - 12:58 AM

I just hate .htaccess only ave what you said to (with my own filename):

<Files siggy.jpg>
ForceType application/x-httpd-php
</Files>

and I made siggy.jpg:

<?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');

// set the dimensions
$img_width = 240;
$img_height = 25;

// create the image
$image = imagecreate($img_width, $img_height);

// 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 background colour and border
imagefilledrectangle($image, 0, 0, $img_width, $img_height, $cool);

// set the font and print text
$font = 'Arial.ttf';

ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR);

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

?>

and it just comes up with a blank page:

http://www.phazm.net/siggy.jpg

gah! :-P

#19 User is offline   tawxic 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 02-November 03

Posted 04 November 2003 - 01:16 AM

well, I got http://www.phazm.net/siggy.php to draw a bg color... (I just went in and changed some php.ini settings) but it doesn't write any text.

#20 User is offline   gamehead200 

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

Posted 04 November 2003 - 03:27 PM

Try putting the full path to your font without using CAPITAL letters... :) Then it might work...

Share this topic:


  • 8 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • This topic is locked

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