• 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
But there's something wrong, a word like "assembly" will be replaced with "***embly"...

I'm not a regular expressions expert but it's the origin of the problem.

Somebody has an idea?

585718622[/snapback]

ya, in the array you leave a space before and after the "ass" so like " ass ". You might also want to check for "ass," "ass." "ass!" etc...

That was somewhat implemented in my code above.

  • 0
Heh, due to public interest I might re-start the DSig project..

Here's my current one :

index.jpg

Update Comment and Archives

585718984[/snapback]

Looks like I have comperition :shifty: lol

PS: Has anyone got any ways to copy text on an animated gif???

EDIT: Sorry didn't mean to double post...

  • 0

I will be fiddling with this this afternoon.

Okay, so if i use this (below) where do i put it? As in, what file?

<?php

function lanchk($string) {

?? $obscenities = array("****"," ass ","damn","****","\$hit","bitch","######"," \@ss ");

?? foreach ($obscenities as $curse_word) {

? ? ?? if (stristr(trim($string),$curse_word)) {

? ? ? ? ?? $length = strlen($curse_word);

? ? ? ? ?? for ($i = 1; $i <= $length; $i++) {

? ? ? ? ? ? ?? $stars .= "*";

? ? ? ? ?? }

? ? ? ? ?? $string = eregi_replace($curse_word,$stars,trim($string));

? ? ? ? ?? $stars = "";

? ? ?? }

?? }

?? return $string;

}

?>

Also, how do I use a non-echo page to let users select their own?

I can add a simple page emailling me their suggestion to the same page as the "select words" page.

And also, you add the font fileEDIT 2:with all the image and everything in?

EDIT 2:

http://www.wizzyworld.com/exte:/als/sig/sig.php

it doesnt use my image? :/

Thanks,

Pete

Edited by TheTrainMan
  • 0
Looks like I have comperition  :shifty: lol

PS: Has anyone got any ways to copy text on an animated gif???

EDIT: Sorry didn't mean to double post...

585723494[/snapback]

I only want to allow my visitors to be able to choose a message that is in a list, so that way there is no advertising or bad things in my sig :p. From what I can see....your script looks much more secure than mooodi's in the sense that your script doesn't have the text in the URL which can be easily updated to something else, like moodi's does.

Mooodi's output page

http://www.jpgodlew.com/siggy/dynamic.jpg?go=gochange&amp;newcomment=This+space+for+sale

The message can be changed very easily

Pre's script doesn't have an output page at all. If you could just add like a little thing that says "Message Updated" or something along those lines I would LOVE to use your script ;)

About the animated gif....

Replace:

$im = imagecreate(400, 130);[QUOTE]
With:
[CODE]$im = imagecreatefromgif ("yourimage.gif");  

It may or may not work with an animated gif

  • 0
About the animated gif....

Replace:

$im = imagecreate(400, 130);[QUOTE]
With:
$im = imagecreatefromgif ("yourimage.gif");  

It may or may not work with an animated gif

585726715[/snapback]

That code doesnt work for me... and I really want to use an animated gif :cry:

  • 0

WARNING TO OTHER MEMBERS HAVING DYNAMIC SIGS:

I just received a warning from a mod because of inappropriate material being entered in the dynamic signature.

This makes it difficult because although I have used by own sware filter in the past, its to easy to go past it and I have no control what people say. :(

I feel sad now :cry:

  • 0
WARNING TO OTHER MEMBERS HAVING DYNAMIC SIGS:

I just received a warning from a mod because of inappropriate material being entered in the dynamic signature.

This makes it difficult because although I have used by own sware filter in the past, its to easy to go past it and I have no control what people say. :(

I feel sad now :cry:

585739703[/snapback]

This is exactly why I want to have a list of what people can put on my sig...not have them type in anything.

Any news on that code Pre?

  • 0

after seeing this thread I desided to give my dynamic sig an 'upgrade' all it had was a comment that could be changed to anything by anyone.

I found this thread I tried to put in a server uptime and ip address section, only to find out they wont work becuase my server has disabled the use of those certain commands to help make it more sercure.

So instead I thought id make the little bit i had a bit more 'advanced' but got stuck...

atm the comments ppl post are saved in my txt file in a list eg.

hello

test

hello world

so it posts the whole list on the image, i tried to use

$file = fopen($filename, "r");
$data = fread($file, filesize($filename));
fclose($file);
$text = explode("\r\n", $data);
imagettftext($im, 10, 0, 5, 15, $black, $font, $text[0]);

but it didnt work, then i realised the this would post the very first comment in the txt file, becuase new comments are added to the bottom of the list..so basicly does anyone know how i can do this, perhaps showing the last three comments people have made?

  • 0

Thought i'd add a little bit here.

Here's part of my script, it filters badwords from a .txt file (one per line) which in my app is appendable from the web based control panel.

$badlist = file_get_contents("admin/banned.txt");
$badlist = split("[\n]", $badlist);

foreach ($badlist as $badword) {
	$content = trim($content);
	$badword = trim($badword);
    $content = str_replace($badword,"****", $content);
//	echo $badword . " -&gt; " . $content . "\n&lt;br&gt;";
}

admin/banned.txt is the path to the text file of course, and $content is the string with the anonymous message in. If you're using PHP5, i suggest you use str_ireplace (as its case insensitive).

anonymousjon: keep a file with JUST the current one in (to put into the script), and a logfile with each one in. Simplifies it greatly.

Edit: If you want the last 3 values, do what you're currently doing, but see how long the array is first. I cant remember off the top of my head what the function is but i'll go look for you.

Edit2: Who would have thought, the function was called count() :p

Do this (again, off the top of my head so sorry if there are any errors):

$file = fopen($filename, "r");
$data = fread($file, filesize($filename));
fclose($file);
$text = explode("\r\n", $data);
$max = count($text);
imagettftext($im, 10, 0, 5, 15, $black, $font, $text[$max]);

Then for the other 2 lines i believe you can do this

$max = $max - 1;
imagettftext($im, 10, 0, 5, 15, $black, $font, $text[$max]);

(obviously change X and Y as well)

Edited by Zero1
  • 0

anyone know how to force jpg / png to execute through php on a IIS server? (iis 5.1 or 6.0)..and if you force it to execute through php and it is a standard image, does it cause any issues?

An idea, just change the MIME type to application/x-httpd-php (i think changing the MIME type is same as what .htaccess does for apache? i am not too familiar with that though) for jpg and png? or is that a bad idea?

Thanks :)

Edited by SkyyPunk
  • 0

Does anyone know how I can put data into my .txt file that will not show the imputted data in the URL of the script?

This is what I DON'T want:

dynamic.jpg?go=gochange&amp;newcomment=Someone+Can+Change+This+Very+Easily

newcomment=I+don't+want=the+text+in+the+URL

All I need is a way to get the text into the data file without an output of the entered text in the URL...any ideas?

Edit:

This will be a separate file from the file that actually changes the image. The image file will just read the latest entry in the data file and update the image with that text.

  • 0

You need to use form eg.

&lt;form name="input" action="action.php" method="post"&gt;
    tagline: &lt;input type="text" name="text"&gt;
   &lt;input type="submit" value="Go"&gt;
&lt;/form&gt;

then make text.txt which will is where the comment will be sent to, you need to chmod this to 777.

then make another php file lets call it ations.php this is the action method that the form will use

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

this should place whatever comment someone types in the text box into the firstline of the txt file

  • 0

yup that should just add it to the .txt file

oops i forgot :p you will need to actually upload a txt file and name it text.txt and chmod it to 666

Hoochi, try to find a free php host, there are a few out there :)

thanks zero1, pretty similar to what I had except mine didnt use a text file so i had a huge list of nasty words in script :p

Edited by anonymousjon
  • 0
yup that should just add it to the .txt file :)

oops i forgot :p you will need to actually upload a txt file and name it text.txt :) and chmod it to 666

Hoochi, try to find a free php host, there are a few out there :)

585758782[/snapback]

Recommend any?

  • 0
thinking about it there arnt really any good ones..they all have ads on them etc..

I could set u up with a little bit of webspace if u like?

585758812[/snapback]

Doesn't seem to be a problem, thanks Tim.

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

    • No registered users viewing this page.
  • Posts

    • Meta announces a major leadership change at WhatsApp by Pradeep Viswanathan Meta has announced a major leadership change at WhatsApp, with Will Cathcart stepping down after seven years of leading the world's largest messaging platform. CRED CEO and founder Kunal Shah will take over as the next global head of WhatsApp. CRED is an Indian fintech company focused on creditworthy consumers. As part of the transition, Meta is also making a minority investment in CRED through its Series H funding round. Meta CEO Mark Zuckerberg said Will Cathcart will remain at Meta and move into a new role focused on building new products from the ground up. Cathcart led WhatsApp during a major growth phase, helping the app reach more than 3 billion users worldwide. He also played a key role in expanding WhatsApp’s business offerings while keeping privacy and end-to-end encryption central to the product. Meta’s Chief Product Officer, Chris Cox, said Kunal Shah was selected after a search for a leader who understands WhatsApp’s global scale and future potential. In a leaked internal memo, Cox described Shah as a “serial founder” and one of India’s most respected entrepreneurs, adding that he brings “entrepreneurial energy” and a strong product mindset to the role. As part of the Series H funding round, CRED is raising ₹8,550 crore, or about $900 million, in a round led by Meta. The funding values CRED at ₹43,239 crore, or about $4.5 billion, on a post-money basis. It is important to note that this investment will not give Meta access to CRED customer information. Kunal posted the following on X regarding his new role at Meta: Although Kunal Shah will be stepping away from his operating role as CRED CEO, he will retain his personal shareholding in the company.
    • It wouldn't be hard for me to turn off my TV, if I had one. For one thing, I never scroll Instagram. The only reason I have an account is because Meta created one when it merged the account systems for its various services.
    • OpenAI's new GPT-5.5-Cyber tops Claude Mythos 5 in vulnerability benchmark by Pradeep Viswanathan OpenAI today announced a major expansion of Daybreak, a cybersecurity initiative designed to help defenders find, validate, and fix software vulnerabilities earlier in the development process. The availability of powerful AI models has definitely changed the cybersecurity landscape by making vulnerability discovery much faster. However, the bigger bottleneck for the industry is now patching those vulnerabilities. Impacted software teams need to validate the discovered issues, understand their impact, develop fixes, test them, and deploy patches. Back in March, OpenAI launched a preview of Codex Security, which uses agentic reasoning with automated validation to discover high-impact issues and actionable fixes specific to the codebase. Since then, it has scanned more than 30 million commits across over 30,000 codebases; more than 70,000 findings were marked as fixed by human reviewers, while over 500,000 findings were automatically determined to be fixed. Now, OpenAI is releasing an updated Codex Security plugin that can run deep scans, review recent code changes, generate security reports, trace attack paths, validate findings, and create codebase-specific patches for human review. It can also triage findings from existing scanners, advisories, bug bounty reports, and ticketing systems. OpenAI says the plugin can export results to vulnerability management systems and integrate with workflows using SARIF files, CodeQL queries, the Codex CLI, and the Codex app. Back in May, OpenAI announced the preview of GPT-5.5-Cyber, a new model built on top of the recently released GPT-5.5, designed for specialized cybersecurity work. Today, OpenAI launched the full version of GPT-5.5-Cyber through a limited release for verified defenders. On CyberGym, GPT-5.5-Cyber scored 85.6%, compared with 81.8% for GPT-5.5 and 83.8% for Claude Mythos 5. It also scored 39.5% on ExploitGym, compared with 25.95% for GPT-5.5, and 69.8% on SEC-bench Pro, compared with 63.1%. OpenAI also announced the new Daybreak Cyber Partner Program, which will allow security vendors and service providers to use GPT-5.5 with Trusted Access for Cyber in their products and services. Accenture, Akamai, Cisco, Cloudflare, CrowdStrike, IBM, Palo Alto Networks, Proofpoint, SentinelOne, Wiz, Zscaler, and others were listed as initial partners for this program. OpenAI is also launching Patch the Planet with Trail of Bits, HackerOne, Calif, researchers, and maintainers. More than 30 open-source projects have committed to participate, including cURL, Go, Python, Sigstore, and pyca/cryptography.
    • AMD confirms 26.6.2 FSR driver breaks on many Windows PCs by Sayan Sen Earlier today AMD released a major graphics driver update as it brings support for FSR 4.1 to Radeon RX 7000 series GPUs. The new update, version 26.6.2, also brings support for Assassin's Creed Black Flag Resynced and more. And while the driver technically supports Windows 10 version 21H2 and newer, the tech giant has confirmed that there is a major issue with the new driver on non-Windows 11 PCs as it fails to launch properly on such systems. The error message says, "The version of AMD Software that you have launched is not compatible with your currently installed AMD graphics driver." Therefore on the surface it looks like a compatibility problem. AMD has also confirmed that the device manager will display the yellow bang or yellow exclamation sign alongside your GPU under the Display adapters dropdown. Here is what the Radeon team's official advisory recommends to affected users: "Users Running Windows 10 and AMD Software: Adrenalin Edition 26.6.2 May Encounter Yellow Bang in Device Manager Affecting AMD Radeon RX Series Graphics ... Our Engineers are currently investigating this issue and will provide a fix once it is available. Affected users may revert to AMD Software: Adrenalin Edition 26.6.1 as a temporary workaround." As such you should revert back to the previous 26.6.1 driver which was released earlier this month. In case you were looking to play Assassin's Creed Black Flag Resynced and DOOM: The Dark Ages | Revelations you will probably have to wait a while if you want the driver to support those games officially. You can find the support article here on Microsoft's website.
  • Recent Achievements

    • One Month Later
      nates earned a badge
      One Month Later
    • Week One Done
      Almohandis earned a badge
      Week One Done
    • Rookie
      dorf went up a rank
      Rookie
    • First Post
      mike_rumble earned a badge
      First Post
    • Dedicated
      tuben earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      506
    2. 2
      +Edouard
      207
    3. 3
      PsYcHoKiLLa
      98
    4. 4
      Michael Scrip
      89
    5. 5
      neufuse
      71
  • Tell a friend

    Love Neowin? Tell a friend!