Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to make a dynamic signature (IP sig)

Featured Replies

  • Author

OK, I want you to try two more things...

First, put this in:

// get IP
$ip = $_SERVER['REMOTE_ADDR'];

$text = "Your IP address is $ip!";

// replace this part
ImageTTFText ($image, 8, 0, 10, 17, $white, $font, $text);

If that doesn't work, change your font to just the font name.

Example:

$font = 'verdana.ttf';

If that doesn't work, well, I really don't know what will... :wacko:


OK, I want you to try two more things...

First, put this in:

// get IP
$ip = $_SERVER['REMOTE_ADDR'];

$text = "Your IP address is $ip!";

// replace this part
ImageTTFText ($image, 8, 0, 10, 17, $white, $font, $text);

If that doesn't work, change your font to just the font name. 

Example:

$font = 'verdana.ttf';

If that doesn't work, well, I really don't know what will... :wacko:

Should it look like this?

<?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 background colour

// number or is top left pixel x, top left pixel y, bottom right pixel x, bottom right pixel y

imagefilledrectangle($image, 0, 0, $img_width, $img_height, $cool);

// set the font and print text

$font = TAGSXTREME.TTF;

// get IP

$ip = $_SERVER['REMOTE_ADDR'];

$text = "Your IP address is $ip!";

// replace this part

ImageTTFText ($image, 8, 0, 10, 17, $white, $font, $text);

// the above will display your IP address

// 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);

// output and destroy

imagepng($image);

imagedestroy($image);

?>

  • Author
Should it look like this?
<?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 background colour

// number or is top left pixel x, top left pixel y, bottom right pixel x, bottom right pixel y

imagefilledrectangle($image, 0, 0, $img_width, $img_height, $cool);

// set the font and print text

$font = TAGSXTREME.TTF;

// get IP

$ip = $_SERVER['REMOTE_ADDR'];

$text = "Your IP address is $ip!";

// replace this part

ImageTTFText ($image, 8, 0, 10, 17, $white, $font, $text);

// the above will display your IP address

// 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);

// output and destroy

imagepng($image);

imagedestroy($image);

?>

Just move the following up to before it says "set background colour":

// 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);

Still no go... can you try the code itself, so to see if it actually works?

I'm getting frustrated here, and there should be no reason why this isn't working...

  • Author
Still no go... can you try the code itself, so to see if it actually works?

I'm getting frustrated here, and there should be no reason why this isn't working...

The code is working fine on my machine... I will even start my Mac's webserver to see if its a Mac problem... BRB...

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

===================

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

===================

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

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

  • Author

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

  • 3 weeks later...
  • 1 month later...

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 />"

  • 2 weeks later...

mysig.jpg

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?

mysig.jpg

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?

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.co.nr/test/mysig.png

;):P

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.