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 has been archived. This means that you cannot reply to this topic.
150 replies to this topic

#76
tawxic

tawxic

    Newbie

  • Member
  • 35 posts
  • Joined 02-November 03
eh - anyone know why it's tellin me:

[Fri Dec 12 04:11:40 2003] [error] [client 68.116.78.89] Premature end of script headers: /home/phazm/public_html/sig/siggy.jpg

I just got a new host.. they have the latest version of PHP :)
Posted Image


How to remove advertisement from MSFN

#77
tawxic

tawxic

    Newbie

  • Member
  • 35 posts
  • Joined 02-November 03
oi, here's 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');

$textfile ="quotes.txt"; // change to the filename/path of your file with quotes.
$quotes = file("$textfile");
$quote = rand(0, sizeof($quotes)-1);
$getquote =  wordwrap($quotes[$quote], 55, "\n", 1);
$ipad = getenv("REMOTE_ADDR");
$dns = strtolower(@gethostbyaddr(getenv("REMOTE_ADDR")));
$today = date("m-d-Y");

// create the image
$image = imagecreatefromgif("about-bg.gif");

// set the colours
$cool = imagecolorallocate($image, 87, 87, 87);
$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);

// counter
$viewss = file("views.txt");
$views = $viewss[0]; $views++;
$fp = fopen("views.txt", "w");
fwrite($fp, $views);
fclose($fp);
$info = "$today - You are $dns ($ipad)";
$counter = "$views people informed - © 2003 Phazm Graphics - http://www.phazm.net/";

// define geek code
$nerd = $getquote;

// line style line
$line = "___________________________________________________________";

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

ImageTTFText ($image, 10, 0, 45, 35, $white, $font, $nerd);
ImageTTFText ($image, 8, 0, 27, 126, $white, $font, $info);
ImageTTFText ($image, 8, 0, 27, 130, $white, $font, $line);
ImageTTFText ($image, 8, 0, 27, 143, $white, $font, $counter);

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

?>

Posted Image

#78
Vega

Vega
  • Member
  • 1 posts
  • Joined 11-December 03
Is this sopposed to be like, in php or something? I have never programmed in php but I have thought about it. If it is, can someone give me resources where I could learn to program in php and get a compiler (if one is required)?

#79
tawxic

tawxic

    Newbie

  • Member
  • 35 posts
  • Joined 02-November 03
I made a dynamic avatar :)

Posted Image
Posted Image

#80
tawxic

tawxic

    Newbie

  • Member
  • 35 posts
  • Joined 02-November 03
What's the code for makign a random IMAGE (not background) - I want to be able to position it, also.
Posted Image

#81
bman3022

bman3022

    Newbie

  • Member
  • 26 posts
  • Joined 22-November 03
I found this script :
<?php

/*
    Name your images 1.jpg, 2.jpg etc.

    Add this line to your page where you want the images to 
    appear: <?php include "randomimage.php"; ?>
*/ 

// Change this to the total number of images in the folder
$total = "11";

// Change to the type of files to use eg. .jpg or .gif
$file_type = ".jpg";

// Change to the location of the folder containing the images
$image_folder = "images/random";

// You do not need to edit below this line

$start = "1";

$random = mt_rand($start, $total);

$image_name = $random . $file_type;

echo "<img src=\"$image_folder/$image_name\" alt=\"$image_name\" />";

?>
I got it from here: http://www.devscript...it.php?sId=3424

Try working with it in the script it might work.
Sig Oversized - Removed by Admin

#82
tawxic

tawxic

    Newbie

  • Member
  • 35 posts
  • Joined 02-November 03
well, here is the other one I'm working on:

Posted Image

And I want to make a random image in the right side of it, cuz it's blank..

I Could just make the background have that image in it, but that would be tedious... actually... I think I will do that.. lol :)

Thanks!
Posted Image

#83
Tinker

Tinker

    "TINKER til ya fix it"

  • Member
  • PipPipPipPip
  • 570 posts
  • Joined 13-May 02
Well MERRY X-MAS..............

Looks like the 500x100 80k sig rule is no longer in effect. The sigs just keep getting bigger and bigger. I can not believe that the folks that have over sized sigs do not know that they are breaking the rules. The sig rule is at the top of this thread for all to read. So let me be the first to say, "Have a Big Sig day"...

Posted Image

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


#84
tazz

tazz
  • Member
  • 1 posts
  • Joined 06-January 04
I've been playing with this the whole day and couldn't get it to work. First I got errors and garbles and now I only get a red x.

Does anybody have the source files (ones that work) I could play with?

#85
hwa

hwa
  • Member
  • 2 posts
  • Joined 06-January 04
The only thing I'm having trouble with is the actual text showing up.

:/

When I direct my browser to siggy.jpg the blank-bg.gif is what comes up as siggy.jpg, the views.txt is also being updated so the php must be executing.

I've checked and double checked the path to the TTF file. Is there something else that I'm missing that could be causing the image to be generated without any text?

siggy.jpg

I added the .htaccess like I should have (obviously since the code executes) and even went so far as to put full paths in to all the files called out. Anybody have any idea as to what could be going wrong?

#86
jmoore

jmoore
  • Member
  • 1 posts
  • Joined 06-January 04
HWA, try this:

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

// change to the filename/path of your file with quotes.
$textfile ="http://www.advancedstrikeforce.com/hwa/quotes.txt";
$quotes = file("$textfile");
$quote = rand(0, sizeof($quotes)-1);
$getquote =  wordwrap($quotes[$quote], 55, "\n", 1);

// get ip, host info and date
$ip = $_SERVER['REMOTE_ADDR'];
$fullhost = gethostbyaddr($ip);
$host = preg_replace("/^[^.]+./", "", $fullhost);
$today = date("m-d-Y");

// create the image
$image = imagecreatefromgif("http://www.advancedstrikeforce.com/hwa/about-bg.gif");

// set the colours
$cool = imagecolorallocate($image, 87, 87, 87);
$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);

// counter
$vfile = "views.txt"; // chmod 777
$viewss = file("$vfile"); 
$views = $viewss[0]; $views++;
$fp = fopen("$vfile", "w");
fwrite($fp, $views);
fclose($fp);
$info = "$today - You are $host ($ip)";
$counter = "$views people informed - © 2003 Phazm Graphics - http://www.phazm.net/";

// define geek code
$nerd = $getquote;

// line style line
$line = "___________________________________________________________";

// set the font and print text GD automatically parses ttf files
$font = 'verdana';

ImageTTFText ($image, 10, 0, 45, 35, $black, $font, $nerd);
ImageTTFText ($image, 8, 0, 27, 126, $black, $font, $info);
ImageTTFText ($image, 8, 0, 27, 130, $black, $font, $line);
ImageTTFText ($image, 8, 0, 27, 143, $black, $font, $counter);

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

?>

You can see it here: http://www.wvghosts.com/test/t2.php

#87
hwa

hwa
  • Member
  • 2 posts
  • Joined 06-January 04
I figured out what the problem was ... I changed the TTF info | removed the path and capatalized VERDANA.TTF and it worked.

The 1 issue that I have now is that when I save it as siggy.jpg a lot of people can't see it. (I can see it fine) -- but the same people who couldn't display mine couldn't display other sigs on this board.

To fix the issue I renamed the file to siggy.png and changed the .htaccess to reflect the same, then everyone could see it.

Could that problem be with local side browser settings? Just curious since it appears that their browsers were having a problem displaying a .png file as an actual .jpg when it wasn't. My firebird and IE6 both displayed it properly though.

#88
ml20

ml20

    Junior

  • Member
  • Pip
  • 87 posts
  • Joined 21-October 03
<?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');

// change to the filename/path of your file with quotes.
$textfile ="quotes.txt";
$quotes = file("$textfile");
$quote = rand(0, sizeof($quotes)-1);
$getquote = wordwrap($quotes[$quote], 55, "\n", 1);

// get ip, host info and date
$ip = $_SERVER['REMOTE_ADDR'];
$fullhost = gethostbyaddr($ip);
$host = preg_replace("/^[^.]+./", "", $fullhost);
$today = date("m-d-Y");

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

// set the colours
$cool = imagecolorallocate($image, 87, 87, 87);
$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);

// counter
$vfile = "views.txt"; // chmod 777
$viewss = file("$vfile"); 
$views = $viewss[0]; $views++;
$fp = fopen("$vfile", "w");
fwrite($fp, $views);
fclose($fp);
$info = "$today - You are $host ($ip)";
$counter = "$views people informed/";

// line style line
$line = "___________________________________________________________";

// set the font and print text GD automatically parses ttf files
$font = 'verdana.ttf';

ImageTTFText ($image, 8, 0, 27, 126, $red, $font, $info);
ImageTTFText ($image, 8, 0, 27, 130, $black, $font, $line);
ImageTTFText ($image, 8, 0, 27, 143, $black, $font, $counter);


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

?>

Is there something wrong here, because I am getting a red X and not an image :)

#89
bman3022

bman3022

    Newbie

  • Member
  • 26 posts
  • Joined 22-November 03
chage this:
imagepng($image);
imagedestroy($image);

to this:
imagejpg($image);
imagedestroy($image);

Did you save it as a .jpg?
Sig Oversized - Removed by Admin

#90
ml20

ml20

    Junior

  • Member
  • Pip
  • 87 posts
  • Joined 21-October 03
yes, and when I tried to change imagepng($image), it gave me a php error.

should I save my pic as a png in that case?

#91
gamehead200

gamehead200

    SEARCH!!! SEARCH!!!

  • Super Moderator
  • 6,870 posts
  • Joined 02-September 02
Make sure you have the proper contents in the .htaccess file! :)

#92
ml20

ml20

    Junior

  • Member
  • Pip
  • 87 posts
  • Joined 21-October 03

Make sure you have the proper contents in the .htaccess file! :rolleyes:

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

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

I think it is right... :)

#93
bman3022

bman3022

    Newbie

  • Member
  • 26 posts
  • Joined 22-November 03

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

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

I think it is right... :)

No you dont need to add your background image in the htaccess file. just the sig file
Sig Oversized - Removed by Admin

#94
gamehead200

gamehead200

    SEARCH!!! SEARCH!!!

  • Super Moderator
  • 6,870 posts
  • Joined 02-September 02
Yea... That's it... Your background image will get screwed up if you include it in the .htaccess file... All you need is the sig file as bman said! :)

#95
crawl45

crawl45
  • Member
  • 9 posts
  • Joined 22-January 04
having problems with my randome quote scritp. it keeps showing my quotes as 1,0,or 2.

$textfile = "/home/totallyw/public_html/sig/quotes.txt";

$quotes = file("$textfile");

$quote = rand(0, sizeof($quotes)-1);

$getquote = wordwrap($quotes[$quote], 55, "\n", 1);

help.....
Posted Image

#96
sven

sven

    iPod therefore iHappy

  • Member
  • PipPipPipPipPip
  • 963 posts
  • Joined 13-August 03
what would i do if i wanted that image to refresh every minute to change the quotes?
Posted Image

#97
mindflayerz

mindflayerz
  • Member
  • 2 posts
  • Joined 02-February 04
hi im a total n00b to these boards and was wondering if the people on these forums know a IP signature from a site call www.dana(something).com I've been looking for it for a while, The signature looks like a wooden sign with "your IP is , your ISP is, then at the end it would just say a random phrase. does anyone know what the site is called?. any help is appreiciated.

#98
Aaron

Aaron

    The MSFN Banana

  • Patrons
  • 5,688 posts
  • Joined 17-August 01
www.danasoft.com

That kind of signature from danasoft is getting boring now, it got over-used.

#99
mindflayerz

mindflayerz
  • Member
  • 2 posts
  • Joined 02-February 04
w0000000000000000000000t thanks heaps

#100
elvaholt

elvaholt
  • Member
  • 1 posts
  • Joined 02-February 04
I was wondering if it would be possible for it to draw from a database of images through mysql, instead of the random backgrounds (that someone posted code for) but to use in the browser window http://domain.com/image.gif?image=1 and have it take the image with imgid=1 from the mySQL database?