Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

IP Sig

- - - - -

  • This topic is locked This topic is locked
150 replies to this topic

#1
eXPerience-XP

eXPerience-XP

    The Offical MSFN Newbie

  • Member
  • PipPipPip
  • 365 posts
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?
Images in signatures shall NOT exceed a total of 300x100 and 80kb.


How to remove advertisement from MSFN

#2
XPerties

XPerties

    MSFN OG Senior

  • Patrons
  • 2,994 posts
  • OS:Windows 7 x64
  • Country: Country Flag
I'm thinking this is in the WRONG section.

:)



You want some Glock with that?
★ :::: Xbox Live GamerTag = ScreamingSkulls


#3
Carmon

Carmon

    MSFN's Local Mental Case

  • Member
  • PipPipPipPipPipPipPip
  • 1,598 posts

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

#4
eXPerience-XP

eXPerience-XP

    The Offical MSFN Newbie

  • Member
  • PipPipPip
  • 365 posts
o sorry :)
Images in signatures shall NOT exceed a total of 300x100 and 80kb.

#5
DaveXP

DaveXP

    The One

  • Member
  • PipPipPipPipPipPip
  • 1,295 posts
just take someone else saves time...lol

:)

#6
Tinker

Tinker

    "TINKER til ya fix it"

  • Member
  • PipPipPipPip
  • 597 posts
Posted Image

Try here.......

:)

Posted Image

- - - - - - Adding is like Subtracting, only backwards ++++++


#7
b0r3d

b0r3d

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 821 posts
Interesting ...
Remember, you can wear your underpants four times without washing.
Forwards. Backwards. Inside out forwards, and inside out backwards.

#8
eXPerience-XP

eXPerience-XP

    The Offical MSFN Newbie

  • Member
  • PipPipPip
  • 365 posts
thx tinker i just saw ur reply now.. lol
Images in signatures shall NOT exceed a total of 300x100 and 80kb.

#9
gamehead200

gamehead200

    SEARCH!!! SEARCH!!!

  • Super Moderator
  • 7,039 posts
  • OS:Windows 7 x64
  • Country: Country Flag
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
XPerties

XPerties

    MSFN OG Senior

  • Patrons
  • 2,994 posts
  • OS:Windows 7 x64
  • Country: Country Flag
http://www.xperties.net/

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



You want some Glock with that?
★ :::: Xbox Live GamerTag = ScreamingSkulls


#11
Carmon

Carmon

    MSFN's Local Mental Case

  • Member
  • PipPipPipPipPipPipPip
  • 1,598 posts
:) looks very hard and confusing :rolleyes:
Posted Image

#12
Thanatos

Thanatos

    GGTW

  • Member
  • PipPip
  • 235 posts
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
Posted Image

#13
XPerties

XPerties

    MSFN OG Senior

  • Patrons
  • 2,994 posts
  • OS:Windows 7 x64
  • Country: Country Flag

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.



You want some Glock with that?
★ :::: Xbox Live GamerTag = ScreamingSkulls


#14
gamehead200

gamehead200

    SEARCH!!! SEARCH!!!

  • Super Moderator
  • 7,039 posts
  • OS:Windows 7 x64
  • Country: Country Flag

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
tawxic

tawxic

    Newbie

  • Member
  • 35 posts
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...
Posted Image

#16
gamehead200

gamehead200

    SEARCH!!! SEARCH!!!

  • Super Moderator
  • 7,039 posts
  • OS:Windows 7 x64
  • Country: Country Flag
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
tawxic

tawxic

    Newbie

  • Member
  • 35 posts
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 :-/
Posted Image

#18
tawxic

tawxic

    Newbie

  • Member
  • 35 posts
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
Posted Image

#19
tawxic

tawxic

    Newbie

  • Member
  • 35 posts
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.
Posted Image

#20
gamehead200

gamehead200

    SEARCH!!! SEARCH!!!

  • Super Moderator
  • 7,039 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Try putting the full path to your font without using CAPITAL letters... :) Then it might work...

#21
crowman

crowman

    The True MACMAN

  • Member
  • PipPip
  • 121 posts
wow this sounds and looks very hard and confusing, I had a look at a site which was a tutorial for PHP and my god i think i will skip it :)
Posted Image

#22
tawxic

tawxic

    Newbie

  • Member
  • 35 posts
woot!

okay, adding the full path worked... I now have it working, but only under a .php file.. when I rename it to .jpg or .png and add the neccisary .htaccess file, it's just a blank page, with the php source in the source of the document.. without the .htaccess file telling it to act as if it were php, it displays the php source in the window, so it seems as if the file just isn't loading as if it was php.... suggestions?

(this board doesn't allow the .php extension for img tags :-/
Posted Image

#23
tawxic

tawxic

    Newbie

  • Member
  • 35 posts
hey, a bit off topic maybe, but related... I want to add the CLIENT time in my sig, but I can't think of a way to get the client time in PHP, and I don't think I can use javascript in the image, can I? if no, what are my possible solutions, if any?
Posted Image

#24
gamehead200

gamehead200

    SEARCH!!! SEARCH!!!

  • Super Moderator
  • 7,039 posts
  • OS:Windows 7 x64
  • Country: Country Flag

woot!

okay, adding the full path worked... I now have it working, but only under a .php file.. when I rename it to .jpg or .png and add the neccisary .htaccess file, it's just a blank page, with the php source in the source of the document.. without the .htaccess file telling it to act as if it were php, it displays the php source in the window, so it seems as if the file just isn't loading as if it was php.... suggestions?

(this board doesn't allow the .php extension for img tags :-/

Glad it worked out...Please post your codes here so I can take a look at them...Is it the client time you want or the server time? I know its written CLIENT, just want to make sure! :)

#25
gamehead200

gamehead200

    SEARCH!!! SEARCH!!!

  • Super Moderator
  • 7,039 posts
  • OS:Windows 7 x64
  • Country: Country Flag

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

...

and it just comes up with a blank page:

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

gah! :-P

If both siggy.jpg and siggy.php are in the same folder using the same .htaccess file, you must change the .htaccess file and input the following:

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

<Files siggy.php>
ForceType application/x-httpd-php
</Files>
This way, it will parse both files! :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN