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.

[deleted]

Featured Replies


Follow my guide here:

http://www.msfn.org/board/index.php?showtopic=47730

then define the variable:

$status = file_get_contents("http://progressquest.com/robot.php?name=undeadsoldier&realm=Expodrine&style=pretty");

and output it somewhere in the image like so:

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

Should work. :) It's working in my sig below... See the little green (or red) dot on the top right? That's basically giving my computer's online status by grabbing it from the text output at the Hamachi status site. :)

Edit: I just realized the file_get_contents will not work because it will grab the entire HTML of that page... Working on a solution... ;)

Edit2:

Here we go!!!

sig.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');

// create the image
$image = imagecreatefromjpeg("background.jpg");

// set the colors
$black = imagecolorallocate($image, 0, 0, 0);
$blue = imagecolorallocate($image, 63, 70, 88);
$red = imagecolorallocate($image, 255, 0, 0);

// set the font
$font = 'verdana.ttf';
$size = 8;

// grab status
$grab = file_get_contents("http://progressquest.com/robot.php?name=undeadsoldier&realm=Expodrine");

$split = preg_split("/[\n]+/", $grab);

$line1 = $split[0] . " of Expodrine (" . $split[4] . ")";
$line2 = "Level " . $split[3] . " " . $split[1] . " " . $split[2];
$line3 = $split[5] . " / " . $split[6] . " / " . $split[7];

$combine = $line1 . "\n" . $line2 . "\n" . $line3;

// put text together
ImageTTFText($image, $size, 0, 8, 16, $black, $font, $combine);

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

?>

This is the background image used:

background.jpg

And the contents of the .htaccess file:

Options All -Indexes

<Files sig.jpg>
SetHandler application/x-httpd-php
</Files>

I used the Verdana font because I had already saved it somewhere on my machine.

Please try to host this on your own server if you're going to use it since I am now hosting it on one that isn't very reliable and because I use it for other things that usually slow it down (compiling/home music sharing/etc.)

Its not working unfortunately, thanks for the info though :)

*starts to pull hair out*

:lol:

Never mind... :P

I hope that's what you wanted. :)

Also, you might have to play around with it a bit as it is too big, according to forum rules, to be used as a sig.

Edited by gamehead200

It works when I test it on my own server :)

But when I go and upload it, it gives me a "Error 500"

I'm guessing its something to do with the .htaccess file...

My host is on linux :)

You might have to put this instead in your .htaccess file:

Options All -Indexes

<Files sig.jpg>
AddHandler application/x-httpd-php .jpg
</Files>

OR

You might not have GD enabled.

GD is enabled, I've talked to the host admin people

I'll try that method above, and i'll let you know...

EDIT: nope... It doesn't seem to work... Unlesssssssssss.. *idea* (taking out "options")

Taking out the options tag, just gives me the result of whats in the address bar... Which is very odd...

Hehe... This has happened to me before... Did you by any chance rename the sig.jpg file and forget to change it in the .htaccess file? :unsure:

I just got informed that file_get_contents is not supported :(

So is there anywhere I can put my dynamic signature that IS supported?

I have edited Gameheads files a bit, I just need somebody to upload and I'll be as good to go :)

What version of PHP does your host have? He should upgrade to at least PHP 4.4.2 for this to work, if not, PHP 5.1.4.

Ah, some new code generates this :D:

sig2.jpg

Try the following out:

<?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$image = imagecreatefromjpeg("background.jpg");
// set the colors$black = imagecolorallocate($image, 0, 0, 0);
// set the font$font = 'verdana.ttf';$size = 8;
// grab status and split it up$handle = @fopen("http://progressquest.com/robot.php?name=undeadsoldier&realm=Expodrine", "r");if($handle){		for( $i = 0; !feof($handle); $i++ ){				$get = fgets($handle, 4096);				$split[$i] = trim($get, "\n");		}		fclose($handle);}
$line1 = $split[0] . " of Expodrine (" . $split[4] . ")";$line2 = "Level " . $split[3] . " " . $split[1] . " " . $split[2];$line3 = $split[5] . " / " . $split[6] . " / " . $split[7];
$combine = $line1 . "\n" . $line2 . "\n" . $line3;
// put text togetherImageTTFText($image, $size, 0, 8, 16, $black, $font, $combine);
// output and destroyimagejpeg($image);imagedestroy($image);
?>
  • EchoNoise changed the title to [deleted]

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.