Jump to content

dynamic signature thingy


ch3m1st

Recommended Posts

I am making a signature for another site where you can click the picture and it takes you to a form where you write a message and it shows up on that picture. I have most of it done but after every line there is some weird characters, I don't know how to get rid of them

 

<?php
if(isset($_POST['name'])){
$name = $_POST['name'].": ";
$mess = $_POST['message'];

$myFile = "messages.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
fwrite($fh, $name.$mess."\n");
fclose($fh);
}
$file = "messages.txt";
$data = file($file);
$im     = imagecreatefrompng("sig.png");
$black  = imagecolorallocate($im, 0, 0, 0);
$lines = count($data)-1;
for ($t = $lines; $x<19; $x++){
$str=$data[$t];
        imagestring($im, 3, 220, 10 + (($lines-$t) * 10), stripslashes($str), $black);
$t--;
}
header("Content-type: image/png");
imagepng($im);
imagedestroy($im);
?>

 

**EDIT: http://www.zendurl.com/ch3m1st/sig.htm && http://www.zendurl.com/ch3m1st/write.php

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.