• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Sign in to follow this  
Followers 0
eXPerience-XP

IP Sig

151 posts in this topic

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

0

Share this post


Link to post
Share on other sites

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

?>

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

What's the code for makign a random IMAGE (not background) - I want to be able to position it, also.

0

Share this post


Link to post
Share on other sites

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.devscripts.com/visit.php?sId=3424

Try working with it in the script it might work.

0

Share this post


Link to post
Share on other sites

well, here is the other one I'm working on:

siggy2.jpg

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!

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

<?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 :)

0

Share this post


Link to post
Share on other sites

chage this:

imagepng($image);

imagedestroy($image);

to this:

imagejpg($image);

imagedestroy($image);

Did you save it as a .jpg?

0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites
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... :)

0

Share this post


Link to post
Share on other sites
<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

0

Share this post


Link to post
Share on other sites

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! :)

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

what would i do if i wanted that image to refresh every minute to change the quotes?

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

www.danasoft.com

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

0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.