• 0

Dynamic Signatures


Question

How would I make a signature that allows users to put a piece of text into my signature? I know you can use PHP, but I don't have the slightest clue about PHP

(Apart from Cutenews stuff)

Could someone make me a saple signature, very plain, and show me how to allow users to imput text into it thru my website?

Edited by TimRogers
Link to comment
https://www.neowin.net/forum/topic/301987-dynamic-signatures/
Share on other sites

Recommended Posts

  • 0
lol, Question: Is there a way to convert John's script so people dont choose their own, but have a choice of a few in a Drop Down box?

Thanks,

Pete

585764286[/snapback]

Use something like that (raw idea):

<html>
<body>
   <form action="post.php" method="POST" enctype...> <!-- Too lazy -->
   <select name="choice">
   <?
   $content = @file_get_contents( "/path/to/file.txt" );
   $choices = explode( "\n", $content );   // UN*X format, perhaps "\r\n" for Windows and "\r" for MacOS
   foreach( $choices as $key => $value )
   {
   ?>
      <option name="<?=$key;>" value="<?=htmlentities( $value );?>"><?=htmlentities( $value );?></option>
   <?
   }
   ?>
   </select>
   <input type="submit" name="ok" value="ok" />
   </form>
</body>
</html>

You know what to do next...

  • 0

Nope :( Didnt work? I get a parse error with this line:

<option name="<?=$key;>" value="<?=htmlentities( $value );?>"><?=htmlentities( $value );?></option>

Parse error: parse error, unexpected '>' in /home2/mak0sch/public_html/externals/sig/sig_index.php on line 11

:(

  • 0

lol, okay, thats all good, but i have another embarassing problem :p

http://www.wizzyworld.com/externals/sig/sig_index.php and it displays me thing nice and well (i'll figure out how to do it when i get it working :p)

BUT, change it to any of them, and then see what happens :/

Hmm, help?

I know, the file is struggling to make an image because i havent told it what to do, but, yea, what do i have to do next?

EDIT: Okay, my "post" code isnt right, but i have no idea what to do with it. It's just this:

$text = $_POST["text"]; // Or use $_GET["text"] but I really don't recommend doing so!
if ($text == "") { $text = " "; } 
$filename = "text.txt"; 
$file = fopen($filename, "w");
fwrite($file,  $text);
fclose($file);

BUT i have just seen that places what someone puts in a box in the text file. How do I make my sig_index.php file output my image?

Thanks,

Pete

Edited by TheTrainMan
  • 0

i checked that page for you and by the looks of things you havnt put your code in the php tags <?php ?>

so the code above should look like:

&lt;?php
$text = $_POST["text"]; // Or use $_GET["text"] but I really don't recommend doing so!
if ($text == "") { $text = " "; }
$filename = "text.txt";
$file = fopen($filename, "w");
fwrite($file,  $text);
fclose($file);
?&gt;

  • 0

Don't worry about it mate!

Thanks for the fix - no error's now, but no message either :p

Lol, this is soo confusing. My "post.php" file doesnt say a message to show or picture to put the message on, so it doesnt show it, just goes to a blank page - rather funny, but a bit of a b.....

http://www.wizzyworld.com/externals/sig/

&lt;?php
$text = $_POST["text"]; // Or use $_GET["text"] but I really don't recommend doing so!
if ($text == "") { $text = " "; }
$filename = "text.txt";
$file = fopen($filename, "w");
fwrite($file, ?$text);
fclose($file);
?&gt;

Now, i guess the "w" is the file name, so i shall try making that a picture to see if it works:))

Well, i DID try that but it didnt work:(( It made my index display nothing in the box://

I have figured that each time i click the "Change Signature" button, it clears out everything from the text file so there isnt anything there anymore? :pinch::

Edited by TheTrainMan
  • 0

Don't use the "w" mode with fopen( ) because if a file named "text.txt" ($filename value) already exists, it will be re-initialized: it becomes an empty file.

Moreover, in your page, some (double) quotes are missing, it's surely not the origin of the problem but anyway, it's not correct. Also, check your input names.

But I'm not sure you have understand how to create an image...

I have to go, I'll come back soon.

  • 0

I suggest you use "a" (writing) or "a+" (writing AND reading) instead of "w" and take a look at the PHP documentation about fopen( ). Note that the file pointer is placed at the end of the file.

I'm working on a ready-to-use script (which's based on Moodi's and Axon's ones), more info soon.

Edited by Sphinx Myth
  • 0

lol, okay, seems to be happy, but there is one tiny little thing wrong. . .

. . . erm, where does it display my image? It doesnt know that is it supposed to write an image or anything, its like i am missing the vital part of it.

This is really funny! I know it'll all be worth it when its done, but whats the next step? :laugh:

Pete

  • 0
I have written a sig that you can draw on, but my host dosn't have the GD module for perl installed.

Can someone host it for me?

Perhaps someone could port it to PHP since GD seems to be part of the standard install.

SigScribble

Feel free to modify/make your own :)

585776524[/snapback]

Wow, very impressive.

  • 0

I like that! I'll have a play around :D

Hmm, its a good idea, and i couldnt do anything as good, but after you've drawn on the sig - then what? There is no button saying "Submit" or anything to actually change it? BUT, then reading the instructions might help :p

I still want to crack this writing one. I just need it to actually output the image somewhere! None of the files actually seem to say that bit :s

Edited by TheTrainMan
  • 0
I like that! I'll have a play around :D

Hmm, its a good idea, and i couldnt do anything as good, but after you've drawn on the sig - then what? There is no button saying "Submit" or anything to actually change it? BUT, then reading the instructions might help :p

I still want to crack this writing one. I just need it to actually output the image somewhere! None of the files actually seem to say that bit :s

585779522[/snapback]

There is no submit button because as soon as you release the mouse the line is immediately written to the jpeg. No need to have a submit button, that is until I release the next version which will allow unlimited strokes of the mouse so you can draw a complete picture.

I have added more information on how to get it running on an IIS server. Unix people shouldn't have a problem (that I'm aware of).

I've also added a more detailed explanation of how it works.

I'm still waiting to see someone actually use the sig!! ;) (my host dosn't have the GD perl module installed)

SigScribble

  • 0

As I promised a few days ago, I made a basic "ready to use" script pack for dynamic signatures.

In this version:

_ Users choose the message, they don't send theirs (TrainMaster's request)

_ Users can suggest messages

_ Updatable swear filter (via file)

This version uses files to store data. You can easily adapt (and improve) it to a (My)SQL database use. I'll do it if asked.

Well, go to http://sphinx.myth.free.fr/sphinx/neowin to find it. There's a ZIP archive which contains the scripts + a test picture + a font (gothic.ttf).

Feel free to see it at work and to customize it, it's very basic.

I plan to add some administration functions but, for the moment, I think you're not enough lazy for that ;)

  • 0
SigScribble v1.1 released!

- Now it works with unlimited strokes of the pen!

- Added clear & save buttons

- Demo still dosn't work on my host! (sorry about that)

SigScribble v1.1

585783091[/snapback]

Keep up the good work! But, it's a pity that your script uses GD Perl because almost no host provides it. It's stupid, Perl is as useful as PHP...

  • 0
Keep up the good work! But, it's a pity that your script uses GD Perl because almost no host provides it. It's stupid, Perl is as useful as PHP...

585783177[/snapback]

Ok, I've ported it to PHP and added a load function.

Still looking for someone to host it for me :laugh:

SigScribble v1.1 (PHP)

  • 0
Ok, I've ported it to PHP and added a load function.

Still looking for someone to host it for me  :laugh:

SigScribble v1.1 (PHP)

585784690[/snapback]

OK, I'm hosting it on my personal website.

So now, we can use colors and load function :D, well done! I suggest you allow different line thicknesses and it'll be perfect!

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Qualcomm takes on NVIDIA with new Dragonfly CPU and AI chips by Pradeep Viswanathan Microsoft, Google, Amazon, AMD, Meta, Apple, OpenAI, and several others have been developing their own chips for AI infrastructure. However, NVIDIA still remains the dominant player in the market. Today, Qualcomm announced a major expansion of its data center infrastructure portfolio to better compete with NVIDIA. The new lineup includes the Qualcomm Dragonfly C1000 CPU, Qualcomm High Bandwidth Compute technology, the Dragonfly AI300 inference accelerator, new connectivity products, and custom silicon solutions. Qualcomm claims that this new lineup improves performance per watt, token throughput, and total cost of ownership for AI data centers. The Dragonfly C1000 is a new data center CPU built with Qualcomm’s custom Oryon cores. This chip will feature more than 250 cores, frequencies above 5GHz, and a chiplet-based design. Qualcomm claims that this new C1000 can deliver more than 2x better performance per watt compared to existing server CPU offerings based on specifications. The Dragonfly C1000 will support PCIe Gen 7 with more than 2TB/s of connectivity, along with CXL, advanced RAS features, and both air and liquid cooling. Qualcomm expects the Dragonfly C1000 to be commercially available in 2028. Additionally, Qualcomm and Meta announced a multi-year, multi-generation agreement under which Qualcomm will supply Dragonfly C1000 data center CPUs for Meta’s next-generation server fleet. Qualcomm also announced High Bandwidth Compute, a new near-memory computing architecture designed to address AI’s memory bandwidth bottleneck. HBC Gen 1 will debut with the Dragonfly AI250, which is expected to sample in mid-2027. The AI250 will deliver 133TB/s per card, an 18x increase in effective memory bandwidth compared to the AI200 with LPDDR5X. The new Dragonfly AI300 with HBC Gen 2 is a rack-level AI inference platform from Qualcomm. Qualcomm claims that the AI300 can deliver 4x to 8x better performance per watt compared to existing GPU-based architectures based on memory bandwidth per watt per card. The Dragonfly AI300 is expected to be available in 2028.
    • IBM reveals sub-1nm chip technology, production expected in another 5 years by Pradeep Viswanathan TSMC is now leading the chip manufacturing industry with its 2nm-class process node called N2. Samsung Foundry also has a 2nm-class process node called SF2. TSMC says N2 entered volume production in Q4 2025. Samsung says SF2 started mass production in 2025. Today, IBM announced the world’s first sub-1-nanometer chip technology, marking another major semiconductor research milestone. The new technology is based on a 0.7nm, or 7-angstrom, node and uses a new transistor architecture called “nanostack.” The new design vertically stacks and staggers nanosheet-based transistors so that more components can fit into the same chip area while also improving performance and power efficiency. IBM claims that this new sub-1nm chip can pack nearly 100 billion transistors onto a chip the size of a fingernail. This offers almost twice the density, up to 50 percent higher performance, or 70 percent better energy efficiency when compared to IBM's 2nm node design announced back in 2021. Also, IBM mentioned that this new architecture can deliver 40 percent SRAM scaling. It is important to consider that this announcement from IBM is a research milestone rather than a near-term process node launch. Back in 2021, IBM unveiled the world’s first 2nm chip design, claiming 50 billion transistors on a fingernail-sized chip and major performance and efficiency gains. Five years later, IBM’s 2nm technology has still not entered mainstream commercial production. That is because IBM is no longer a major commercial chip manufacturer. It sold its chip manufacturing business to GlobalFoundries years ago and has since then focused only on semiconductor research, IP development, and partnerships. To productize its 2-nm chip technology, IBM partnered with Japan’s Rapidus, but it has not resulted in anything shipping at scale. IBM says that its new sub-1nm technology can reach production as early as within the next five years. If that happens, it will likely depend on manufacturing partners, advanced EUV tooling, and years of yield improvements.
  • Recent Achievements

    • Week One Done
      Meta Plast earned a badge
      Week One Done
    • First Post
      kinowa earned a badge
      First Post
    • Rookie
      krychek57 went up a rank
      Rookie
    • Grand Master
      Jaybonaut went up a rank
      Grand Master
    • One Year In
      Philsl earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      461
    2. 2
      +Edouard
      171
    3. 3
      PsYcHoKiLLa
      136
    4. 4
      Michael Scrip
      78
    5. 5
      Xenon
      77
  • Tell a friend

    Love Neowin? Tell a friend!