Jump to content

replacement within a string


oli_62

Recommended Posts

Hello

I have a guestbook with a .txt file as guestbook entry storage. Now I want make a spam protection and therefore I want replace the E-Mail address in the output.

My .txt file has the following syntax:

[code]
<b>Datum:</b> Sun 04/30/06 8:56PM<br><b>Von:</b> admin<br><b>Email: </b><a href=mailto:[email protected]>[email protected]</a><br><br><b>Eintrag:</b>
[/code]

Now I want replace the following section within the string:

<a href=mailto:[email protected]>[email protected]</a>
<a href=mailto:%</a>

[code]
$buffer = fgets($fd, 4096);

$lines[] = $buffer;
[/code]

Thanks for help!

oli
Link to comment
https://forums.phpfreaks.com/topic/8837-replacement-within-a-string/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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