• 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
Removed my sig thanks to some kid who kept writing f**k over and over again. I guess totally dynamic sigs are a bad idea. I'm thinking the "select a quote" option to be a better idea now.

585804636[/snapback]

From a Neowin rules point of view, these "type anything into my sig" signatures are a liability to users who use them, as those users are responsible for their signatures and can/will get in trouble if there is offensive content in the signature that breaks Neowin Community Rules.

I'd highly suggest people only use the "select a line/quote" type of signatures if they want to be safe.

  • 0
it's been banned, see announcement!

No more Dynamic Sigs!

585881560[/snapback]

More properly stated: no more sigs that allow users to type in anything they want to be displayed. Too easy to violate Neowin's rules with a wide-open text entry system like that.

  • 0
or you could add a word filter to your script :)

585881665[/snapback]

Word filters are rarely complete enough, and too easily bypassed (spaces or other tricks). I had to remove one today that some immature user posted using a circumvention.

Dynamic sigs that allow others to freely enter text for your sigs are no longer allowed. Period.

  • 0
That is exactly what it prevents users from doing. 

Put this in the page that has the form on it (which in this case would be a drop down list)

<?php
session_start();
$_SESSION['Key'] = "Some Big Unknown Key....blablablalba";
?>

and put this on the page that updates your data file

<?php
session_start();
if ($_SESSION['Key'] == "Same as they key you defined in the first file") {
//Your Code Here
$_SESSION['Key'] = "NONE";
}
else
Echo ("Thanks for trying to hack my sig.  Go get a life.");
?>

The user will see the Thanks for trying to hack my sig message if they try to POST the data form another page.

Hope that helps ;)

585810171[/snapback]

That's not a good idea because it's just as unsafe as before.

If you go first on the form, the session key is registered. Then, you can hack from another page without any problem...

Your protection works only if the hack is done immediately.

  • 0

Mine currently has a flaw.

Someone enjoys changing it immaturely to sexual things although I dont know how :(

I shall post it all in a Zip file later, although I am away from my computer for the next 48 hours or so.

I hate immature people!

Okay, so the person has put the following:

"I really ought to validate user input on my sig changer"

Any idea's?

I guess its someone from here. For now though, nobody is changing it anymore, it'll stay with what i put it as. :angry:

Edited by TheTrainMan
  • 0
<?php
$my_sigs = array(  "Someone ought to write me a new sig generator!",
    "This space for rent.",
    "Got l33t?",
    "How's my driving? Call 1-800-223-1221, Ref. 223212");

if(!isset($_POST['submit'])){
?>

print some junk here for your form

<select name="new_sig">
<?php
	for($i = 0; $i < count($my_sigs); $i++){
  print '<option value="$i">$my_sig[$i]</option>';
	}
?>
</select>

do the rest of your form junk here

<?php
//The form was submitted, brings us here
}else{
	if(is_numeric($_POST['new_sig']) && $_POST['new_sig'] < count($my_sigs)){
  //print out the new text to the image here
  print_to_image($my_sigs[$_POST['new_sig']);
	}else{
  header('Location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']); //Monkey business, send them back to page
	}
}
?>

  • 0
....

Okay, so the person has put the following:

"I really ought to validate user input on my sig changer"

Any idea's?

I guess its someone from here. For now though, nobody is changing it anymore, it'll stay with what i put it as.  :angry:

Your script currently has no user input validation, that means someone could save the result of your PHP script locally (HTML file), edit the form to submit to the full URL of your script, edit the option values to be whatever they want, and submit the new edited responses. See above post for an idea on how to remedy that.

  • 0
You can POST/GET variables to a php script simply by adding ?variable=whatever to the end of the script. Perhaps this person is exploiting that fact.

585913629[/snapback]

GET only... or query string...

Anyways, you could make a form which stores select options in an array then when user X submits the form with "W00t! This is so 1337!!", then "W00t! This is so 1337!!" get's written to message.txt using file_put_contents or fopen/fwrite... Then the GD script would file_get_contents the message.txt file ;)

My sig uses a text file to generate it's content.. and a small filter of mine

  • 0
please read this.. im sure its already posted, but this thread is really long.. i dont feel like searching.

it is banned on neowin

585915275[/snapback]

Read again. Sigs that allow users to put in any old test are banned. Ones that have a choice of pre-defined ones are fine.

WOW - code but no explanation? Yes, I see the explanation in the file, but that loosk like a brand new script, NOT building into the script I have? I don't really understand it either - I am NOT php fluent :cry:.

I only just got that sig version online and able to work and now that above seems to be a single file that can do it all instead of the four or five i have?

I don't want to start again because it'll put me right back to the beginning again. Is there not a simple few lines of code that I can include to make sure that it's been submitted from my server rather than locally?

Then again, is it really worth it?

  • 0

Right now your forum sig is still pointed to the old image, otherwise it would show the changes in the thread...

On your sig change page, it looks like sometimes the image gets cached. You might be able to fix this by changing line 36 of index.php to:

  <td><img src="sig.png?<? echo time(); ?>" border="0"></td>

This may force the browser to update the image everytime...

  • 0
Right now your forum sig is still pointed to the old image, otherwise it would show the changes in the thread...

On your sig change page, it looks like sometimes the image gets cached. You might be able to fix this by changing line 36 of index.php to:

 ?<td><img src="sig.png?<? echo time(); ?>" border="0"></td>

This may force the browser to update the image everytime...

585932757[/snapback]

or header("Cache-control: no-cache"); should work as well

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

    • No registered users viewing this page.
  • Posts

    • Microsoft releases PowerToys v0.100.1, fixes a bug that made remapped keys misbehave by Ivan Jenic Microsoft just released PowerToys v0.100.1, a patch update that addresses several stability and behavior issues found in v0.100.0. The v0.100.0 patch was a significant update for PowerToys, as it introduced all sorts of new features and additions, such as a rebuilt Shortcut Guide, a Command Palette Extension Gallery, webcam overlay support in ZoomIt, and more. However, the v0.100.0 version also introduced some bugs and stability issues. And now, Microsoft is addressing these issues in the new patch. The most impactful fix in this release perhaps is in Keyboard Manager, where remapped modifier keys were being delivered as system-key events, causing unexpected behavior in apps. The clearest example of this was Alt-to-Backspace remaps, deleting whole words instead of a single character. So, if you thought there was an issue with your keyboard, Microsoft just confirmed that it was PowerToys. Beyond the Keyboard Manager fix, v0.100.1 also addresses several other issues. It fixes a bug with Power Display that was preventing monitors from waking from standby correctly. Additionally, the new update patches Quick Access crashes on launch, and resolves a Shortcut Guide crash that occurred when switching between sidebar sections. Here’s the full changelog: Color Picker Fixed a bug where the main Color Picker window could appear inside the zoomed-in picker view Command Palette Fixed Run history initialization in AOT builds Fixed a bug where the Performance Monitor dock item could show ??? after restart Fixed the Hibernate command using the Sleep icon Limited the "pin to dock" dialog to displays where the dock is enabled Keyboard Manager Fixed modifier keys remapped to non-modifier keys being delivered as system-key events, which caused unexpected behavior in apps such as Alt-to-Backspace deleting whole words Power Display Fixed a bug where selecting On in the monitor power-state control did not wake a monitor from standby Fixed built-in display detection and brightness control on dual-GPU laptops where the internal panel is driven by the discrete GPU PowerToys Run Fixed VS Code Workspaces discovery after VS Code moved recently opened workspace data to shared storage Quick Access Fixed Quick Access flyout crashes caused by unhandled XAML exceptions during launch or page navigation Shortcut Guide Fixed a crash when navigating between Shortcut Guide sidebar sections Fixed number-key rendering in shortcut manifests and added a Postman shortcut manifest Updated bundled shortcut manifests to use the literal number-key token so number keys render correctly across apps ZoomIt Fixed a race condition in audio initialization for ZoomIt video recording You can download PowerToys v0.100.1 from the official GitHub releases page.
    • OBS Studio 32.2.0 Beta 2 by Razvan Serea OBS Studio is software designed for capturing, compositing, encoding, recording, and streaming video content, efficiently. It is the re-write of the widely used Open Broadcaster Software, to allow even more features and multi-platform support. OBS Studio supports multiple sources, including media files, games, web pages, application windows, webcams, your desktop, microphone and more. OBS Studio Features: High performance real time video/audio capturing and mixing, with unlimited scenes you can switch between seamlessly via custom transitions. Live streaming to Twitch, YouTube, Periscope, Mixer, GoodGame, DailyMotion, Hitbox, VK and any other RTMP server Filters for video sources such as image masking, color correction, chroma/color keying, and more. x264, H.264 and AAC for your live streams and video recordings Intel Quick Sync Video (QSV) and NVIDIA NVENC support Intuitive audio mixer with per-source filters such as noise gate, noise suppression, and gain. Take full control with VST plugin support. GPU-based game capture for high performance game streaming Unlimited number of scenes and sources Number of different and customizable transitions for when you switch between scenes Hotkeys for almost any action such as start or stop your stream or recording, push-to-talk, fast mute of any audio source, show or hide any video source, switch between scenes,and much more Live preview of any changes on your scenes and sources using Studio Mode before pushing them to your stream where your viewers will see those changes DirectShow capture device support (webcams, capture cards, etc) Powerful and easy to use configuration options. Add new Sources, duplicate existing ones, and adjust their properties effortlessly. Streamlined Settings panel for quickly configuring your broadcasts and recordings. Switch between different profiles with ease. Light and dark themes available to fit your environment. …and many other features. For free. At all. OBS Studio 32.2.0 Beta 2 changelog: Beta 2 Changes Fixed a CI deployment issue. There are no application changes since Beta 1. 32.2 New Features Replaced add source dropdown with new dialog [Warchamp7] Improved FPS selector UX [jcm93] Added missing file support for filters [exeldro] Added ability for plugins to set custom icons for new source types [cg2121] Included .webp files when adding a directory to Image Slide Show source [TarunCore] Added copy paste functions to frontend API [exeldro] Added filter to compose SDR into HDR [jpark37] Added delete as a hotkey to delete sources on macOS [PatTheMav] Added dynamic bitrate support to multitrack video [lexano-ivs] 32.2 Changes Forced Intel-based installations to update to Apple Silicon version on macOS [PatTheMav] This change means that OBS Studio versions built for Intel-based Macs but running on Apple Silicon Macs will automatically update to OBS Studio built for Apple Silicon Macs. If an installation was using third-party plugins, those plugins will no longer load until replaced with Apple Silicon versions. Fixed audio mixer state getting out of sync when changing settings via websockets or plugins [Warchamp7] Added theming for checked QToolButtons [glikely] Improved OpenGL performance slightly on low-end machines [kkartaltepe] Set minimum size for color source to 1 pixel [exeldro] Added minimum width to spinboxes [Warchamp7] Disallowed overwriting the crash handler [sebastian-s-beckmann] Applied process mitigation policies for Windows [notr1ch] Adjusted description of multitrack video [jhnbwrs] Changed new capture devices to use fallback frame rate by default [PatTheMav] Improved DLL loading behavior on Windows [notr1ch] Limited multitrack video config to Custom service [PatTheMav] 32.2 Bug Fixes Fixed OAuth and dock state save corruption [PatTheMav] Fixed group bounds not resizing when removing items [howellrl] Fixed canvas mixes not being restored after video reset [dsaedtler] Fixed some erroneous crashes during shutdown [Warchamp7] Fixed display capture sometimes capturing black after a duplicator failure [ThrowTop] Fixed color of controls dock output buttons in System theme [shiina424] Fixed virtual camera reset failures [stephematician] Fixed potential crash when user discards changes in the settings window [suogesi] Fixed incorrect return value in virtualcam filter [xtfo] Fixed source toolbar buttons not working after dragging a source into a group [Warchamp7] Fixed properties hint icon spacing [Warchamp7] Fixed potential crash when a video device reconnects on macOS [jcm93] Fixed an issue where PipeWire could fail on NVIDIA GPUs [hoshinolina] Fixed obs_canvas_get_video_info returning incorrect framerate [dsaedtler] 32.2 Deprecations Deprecated obs_properties_add_button [sebastian-s-beckmann] Download: OBS Studio 32.2.0 Beta 2 | Portable | ARM64 | ~200.0 MB (Open Source) View: OBS Studio Homepage | Other Operating Systems | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Is a fast food restaurant a good metric to compare against?
    • Grand Theft Auto VI pricing revealed alongside Ultimate Edition and pre-loading details by Pulasthi Ariyasinghe Last week, Rockstar revealed Grand Theft Auto VI pre-orders will be starting soon, and just a day ahead of that, now the studio has announced the official pricing for the highly anticipated game. This has been a hotly debated topic among fans and industry veterans for a long time, considering the game is expected to be the biggest entertainment product launch ever. The confirmed pricing for the Grand Theft Auto VI standard edition is $79.99, which Rockstar says gives access to the "single-player experience set in the biggest, most immersive evolution of the series yet." This follows what most of our readers thought would happen with the pricing too. At the same time, a $99.99 Grand Theft Auto VI: Ultimate Edition has been confirmed as well, which lands with "an exclusive collection of premium vehicles, weapons, apparel, and action threaded across all aspects of Jason and Lucia’s story." Pre-ordering will also give fans extra bonuses, including a Vintage Vice City Pack of cosmetic items as well as a free month of GTA+. Head to the official website of the game here to check out all the cosmetic rewards the Ultimate Edition and pre-orders bring. Interestingly, the studio does not mention Grand Theft Auto VI multiplayer at all in today's announcement. Perhaps this will arrive later, following the campaign launch, or the studio is keeping that reveal for a later date. Digital pre-orders for Grand Theft Auto VI will begin on June 25, 2026, at midnight local time across regions for Xbox Series X|S and PlayStation 5. The title is slated to launch on November 19 on those same platforms. Pre-loading for Grand Theft Auto VI will kick off on November 12, giving players a week to get the game ready on their consoles. As for the physical edition, Take-Two has confirmed that this will be available without a disc, with the box only containing a download code inside. This will be purchasable starting November 12, giving players who take this route time to pre-load the title as well.
  • Recent Achievements

    • One Year In
      OHI Accounting earned a badge
      One Year In
    • First Post
      Almohandis earned a badge
      First Post
    • Rookie
      DaviKar went up a rank
      Rookie
    • Dedicated
      HidekoYamamoto94 earned a badge
      Dedicated
    • One Month Later
      timbobit earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      472
    2. 2
      +Edouard
      170
    3. 3
      PsYcHoKiLLa
      121
    4. 4
      Michael Scrip
      81
    5. 5
      Xenon
      70
  • Tell a friend

    Love Neowin? Tell a friend!