bijzondere tekens
als een bericht verstuur en gebruik daar en &,!,<
teken in word deze niet weergegeven in het bericht dat verstuurd/geplaatst is..... help wat moet ik doen!!!!!!
dit is het php bestand:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
$Submit = $_POST["Submit"];
$Name = $_POST["Name"];
$Email = $_POST["Email"];
$Website = $_POST["Website"];
$Comments = $_POST["Comments"];
$NumLow = $_REQUEST["NumLow"];
$NumHigh = $_REQUEST["NumHigh"];
$Name = ereg_replace("[^A-Za-z0-9 ]", "",$Name);
$Email = ereg_replace("[^A-Za-z0-9 \@\.\-\/\']", "",$Email);
$Website = eregi_replace("http://", "",$Website);
$Website = ereg_replace("[^A-Za-z0-9 \@\.\-\/\'\~\:]", "",$Website);
$Comments = eregi_replace("[^A-Za-z0-9 \@\&\.\-\/\'\~\:]", "",$Comments);
$Comments = eregi_replace('neuken', '****',$Comments);
$Comments = eregi_replace('kankerboeren', '****',$Comments);
$Comments = eregi_replace('terin', '****',$Comments);
$Comments = eregi_replace('kanker', '****',$Comments);
$Comments = eregi_replace('vagina', '****',$Comments);
$Comments = eregi_replace('tievus', '****',$Comments);
$Comments = eregi_replace('tyfus', '****',$Comments);
$Comments = eregi_replace('klote', '****',$Comments);
$Comments = eregi_replace('pik', '****',$Comments);
$Comments = eregi_replace('kut', '****',$Comments);
$Comments = eregi_replace('lul', '****',$Comments);
$Comments = eregi_replace('godverdomme', '@#%&^!#@!',$Comments);
$Comments = eregi_replace('homo', '****',$Comments);
$Comments = eregi_replace('flikker', '****',$Comments);
$Comments = eregi_replace('nicht', '****',$Comments);
$Comments = eregi_replace('hoer', '****',$Comments);
$Comments = eregi_replace('likker', '****',$Comments);
$Comments = eregi_replace('suck', '****',$Comments);
$Comments = eregi_replace('fuck', '****',$Comments);
$Comments = eregi_replace('slet', '****',$Comments);
$Comments = eregi_replace('aids', '****',$Comments);
$Comments = eregi_replace('nigt', '****',$Comments);
$Comments = eregi_replace('neuken', '****',$Comments);
$Comments = eregi_replace('shit', 'poep',$Comments);
$Comments = eregi_replace('neuke', '****',$Comments);
$Comments = eregi_replace('boeren', '****',$Comments);
$Comments = eregi_replace('hoeren', '****',$Comments);
$Comments = eregi_replace('nicht', '****',$Comments);
$Comments = eregi_replace('penis', '****',$Comments);
$Comments = eregi_replace('p1is', '****',$Comments);
$Comments = eregi_replace('boer', '****',$Comments);
$Comments = eregi_replace('kutwijf', '****',$Comments);
$Comments = eregi_replace('doos', 'lekker wijf',$Comments);
$Comments = eregi_replace('pisnicht', '****',$Comments);
$Comments = eregi_replace('&', 'en',$Comments);
$Name = stripslashes($Name);
$Email = stripslashes($Email);
$Website = stripslashes($Website);
$Comments = stripslashes($Comments);
if ($Submit == "Yes") {
$filename = "GuestBook.txt";
// Opens up the file declared above for reading
$fp = fopen( $filename,"r");
$OldData = fread($fp, 80000);
fclose( $fp );
// Gets the current Date of when the entry was submitted
$Today = (date ("l dS of F Y ( h:i:s A )",time()));
// Puts the recently added data into html format that can be read into the Flash Movie.
// You can change this up and add additional html formating to this area. For a complete listing of all html tags
// you can use in flash - visit: http://www.macromedia.com/support/flash/ts/documents/htmltext.htm
$Input = "Name: <b>$Name</b><br>Email: <b><u><a href=\"mailto:$Email\">$Email</a></u></b><br>Website: <b><u><a href=\"http://$Website\" target=\"_blank\">$Website</a></u></b><br>Comments: <b>$Comments</b><br><i><font size=\"-1\">Date: $Today</font><br><br>.:::.";
/* This Line adds the '&GuestBook=' part to the front of the data that is stored in the text file. This is important because without this the Flash movie would not be able to assign the variable 'GuestBook' to the value that is located in this text file */
$New = "$Input$OldData";
// Opens and writes the file.
$fp = fopen( $filename,"w");
if(!$fp) die("&GuestBook=cannot write $filename ......&");
fwrite($fp, $New, 800000);
fclose( $fp );
}
// ###################################################################################
// ######### Formatting and Printing the Data from the Guestbook to the Flash Movie ##
// Next line tells the script which Text file to open.
$filename = "GuestBook.txt";
// Opens up the file declared above for reading
$fp = fopen( $filename,"r");
$Data = fread($fp, 800000);
fclose( $fp );
// Splits the Old data into an array anytime it finds the pattern .:::.
$DataArray = split (".:::.", $Data);
// Counts the Number of entries in the GuestBook
$NumEntries = count($DataArray) - 1;
print "&TotalEntries=$NumEntries&NumLow=$NumLow&NumHigh=$NumHigh&GuestBook=";
for ($n = $NumLow; $n < $NumHigh; $n++) {
print $DataArray[$n];
if (!$DataArray[$n]) {
Print "<br><br><b>No More entries</b>";
exit;
}
}
?>
$Submit = $_POST["Submit"];
$Name = $_POST["Name"];
$Email = $_POST["Email"];
$Website = $_POST["Website"];
$Comments = $_POST["Comments"];
$NumLow = $_REQUEST["NumLow"];
$NumHigh = $_REQUEST["NumHigh"];
$Name = ereg_replace("[^A-Za-z0-9 ]", "",$Name);
$Email = ereg_replace("[^A-Za-z0-9 \@\.\-\/\']", "",$Email);
$Website = eregi_replace("http://", "",$Website);
$Website = ereg_replace("[^A-Za-z0-9 \@\.\-\/\'\~\:]", "",$Website);
$Comments = eregi_replace("[^A-Za-z0-9 \@\&\.\-\/\'\~\:]", "",$Comments);
$Comments = eregi_replace('neuken', '****',$Comments);
$Comments = eregi_replace('kankerboeren', '****',$Comments);
$Comments = eregi_replace('terin', '****',$Comments);
$Comments = eregi_replace('kanker', '****',$Comments);
$Comments = eregi_replace('vagina', '****',$Comments);
$Comments = eregi_replace('tievus', '****',$Comments);
$Comments = eregi_replace('tyfus', '****',$Comments);
$Comments = eregi_replace('klote', '****',$Comments);
$Comments = eregi_replace('pik', '****',$Comments);
$Comments = eregi_replace('kut', '****',$Comments);
$Comments = eregi_replace('lul', '****',$Comments);
$Comments = eregi_replace('godverdomme', '@#%&^!#@!',$Comments);
$Comments = eregi_replace('homo', '****',$Comments);
$Comments = eregi_replace('flikker', '****',$Comments);
$Comments = eregi_replace('nicht', '****',$Comments);
$Comments = eregi_replace('hoer', '****',$Comments);
$Comments = eregi_replace('likker', '****',$Comments);
$Comments = eregi_replace('suck', '****',$Comments);
$Comments = eregi_replace('fuck', '****',$Comments);
$Comments = eregi_replace('slet', '****',$Comments);
$Comments = eregi_replace('aids', '****',$Comments);
$Comments = eregi_replace('nigt', '****',$Comments);
$Comments = eregi_replace('neuken', '****',$Comments);
$Comments = eregi_replace('shit', 'poep',$Comments);
$Comments = eregi_replace('neuke', '****',$Comments);
$Comments = eregi_replace('boeren', '****',$Comments);
$Comments = eregi_replace('hoeren', '****',$Comments);
$Comments = eregi_replace('nicht', '****',$Comments);
$Comments = eregi_replace('penis', '****',$Comments);
$Comments = eregi_replace('p1is', '****',$Comments);
$Comments = eregi_replace('boer', '****',$Comments);
$Comments = eregi_replace('kutwijf', '****',$Comments);
$Comments = eregi_replace('doos', 'lekker wijf',$Comments);
$Comments = eregi_replace('pisnicht', '****',$Comments);
$Comments = eregi_replace('&', 'en',$Comments);
$Name = stripslashes($Name);
$Email = stripslashes($Email);
$Website = stripslashes($Website);
$Comments = stripslashes($Comments);
if ($Submit == "Yes") {
$filename = "GuestBook.txt";
// Opens up the file declared above for reading
$fp = fopen( $filename,"r");
$OldData = fread($fp, 80000);
fclose( $fp );
// Gets the current Date of when the entry was submitted
$Today = (date ("l dS of F Y ( h:i:s A )",time()));
// Puts the recently added data into html format that can be read into the Flash Movie.
// You can change this up and add additional html formating to this area. For a complete listing of all html tags
// you can use in flash - visit: http://www.macromedia.com/support/flash/ts/documents/htmltext.htm
$Input = "Name: <b>$Name</b><br>Email: <b><u><a href=\"mailto:$Email\">$Email</a></u></b><br>Website: <b><u><a href=\"http://$Website\" target=\"_blank\">$Website</a></u></b><br>Comments: <b>$Comments</b><br><i><font size=\"-1\">Date: $Today</font><br><br>.:::.";
/* This Line adds the '&GuestBook=' part to the front of the data that is stored in the text file. This is important because without this the Flash movie would not be able to assign the variable 'GuestBook' to the value that is located in this text file */
$New = "$Input$OldData";
// Opens and writes the file.
$fp = fopen( $filename,"w");
if(!$fp) die("&GuestBook=cannot write $filename ......&");
fwrite($fp, $New, 800000);
fclose( $fp );
}
// ###################################################################################
// ######### Formatting and Printing the Data from the Guestbook to the Flash Movie ##
// Next line tells the script which Text file to open.
$filename = "GuestBook.txt";
// Opens up the file declared above for reading
$fp = fopen( $filename,"r");
$Data = fread($fp, 800000);
fclose( $fp );
// Splits the Old data into an array anytime it finds the pattern .:::.
$DataArray = split (".:::.", $Data);
// Counts the Number of entries in the GuestBook
$NumEntries = count($DataArray) - 1;
print "&TotalEntries=$NumEntries&NumLow=$NumLow&NumHigh=$NumHigh&GuestBook=";
for ($n = $NumLow; $n < $NumHigh; $n++) {
print $DataArray[$n];
if (!$DataArray[$n]) {
Print "<br><br><b>No More entries</b>";
exit;
}
}
?>
$Comments = eregi_replace("[^A-Za-z0-9 \@\&\.\-\/\'\~\:]", "",$Comments);
de @ & . - ~ worden allemaal vervangen door ""
Quote:
$Comments = eregi_replace('neuken', '****',$Comments);
$Comments = eregi_replace('kankerboeren', '****',$Comments);
$Comments = eregi_replace('terin', '****',$Comments);
$Comments = eregi_replace('kanker', '****',$Comments);
$Comments = eregi_replace('vagina', '****',$Comments);
$Comments = eregi_replace('tievus', '****',$Comments);
$Comments = eregi_replace('tyfus', '****',$Comments);
$Comments = eregi_replace('klote', '****',$Comments);
$Comments = eregi_replace('pik', '****',$Comments);
$Comments = eregi_replace('kut', '****',$Comments);
$Comments = eregi_replace('lul', '****',$Comments);
$Comments = eregi_replace('godverdomme', '@#%&^!#@!',$Comments);
$Comments = eregi_replace('homo', '****',$Comments);
$Comments = eregi_replace('flikker', '****',$Comments);
$Comments = eregi_replace('nicht', '****',$Comments);
$Comments = eregi_replace('hoer', '****',$Comments);
$Comments = eregi_replace('likker', '****',$Comments);
$Comments = eregi_replace('suck', '****',$Comments);
$Comments = eregi_replace('fuck', '****',$Comments);
$Comments = eregi_replace('slet', '****',$Comments);
// enz...
$Comments = eregi_replace('&', 'en',$Comments);
dit is lang heeeeeeeel lang$Comments = eregi_replace('neuken', '****',$Comments);
$Comments = eregi_replace('kankerboeren', '****',$Comments);
$Comments = eregi_replace('terin', '****',$Comments);
$Comments = eregi_replace('kanker', '****',$Comments);
$Comments = eregi_replace('vagina', '****',$Comments);
$Comments = eregi_replace('tievus', '****',$Comments);
$Comments = eregi_replace('tyfus', '****',$Comments);
$Comments = eregi_replace('klote', '****',$Comments);
$Comments = eregi_replace('pik', '****',$Comments);
$Comments = eregi_replace('kut', '****',$Comments);
$Comments = eregi_replace('lul', '****',$Comments);
$Comments = eregi_replace('godverdomme', '@#%&^!#@!',$Comments);
$Comments = eregi_replace('homo', '****',$Comments);
$Comments = eregi_replace('flikker', '****',$Comments);
$Comments = eregi_replace('nicht', '****',$Comments);
$Comments = eregi_replace('hoer', '****',$Comments);
$Comments = eregi_replace('likker', '****',$Comments);
$Comments = eregi_replace('suck', '****',$Comments);
$Comments = eregi_replace('fuck', '****',$Comments);
$Comments = eregi_replace('slet', '****',$Comments);
// enz...
$Comments = eregi_replace('&', 'en',$Comments);
doe gewoon dit:
Code (php)
1
2
3
4
5
6
7
2
3
4
5
6
7
<?
$verkeert = array("blaat","slecht","verkeert"); // zet hier alle verkeerde dingen
for($i=0;$i<= count($verkeert);$i++) {
$comments = str_replace($verkeert[$i],"****",$comments); // *** voor wat het word
}
$Comments = str_replace('&', 'en',$Comments);
?>
$verkeert = array("blaat","slecht","verkeert"); // zet hier alle verkeerde dingen
for($i=0;$i<= count($verkeert);$i++) {
$comments = str_replace($verkeert[$i],"****",$comments); // *** voor wat het word
}
$Comments = str_replace('&', 'en',$Comments);
?>
zoiets is korter en beter!
Gewijzigd op 05/07/2005 18:55:00 door Han eev
Code (php)
1
2
3
4
5
2
3
4
5
<?php
$comments = 'rare trut ben jij zeg klotelievehoer';
$wrong = array('trut', 'klote', 'hoer', 'slet');
$comments = str_replace($wrong, '***', $comments);
?>
$comments = 'rare trut ben jij zeg klotelievehoer';
$wrong = array('trut', 'klote', 'hoer', 'slet');
$comments = str_replace($wrong, '***', $comments);
?>
is tot daar aan toe, maar dat je verkeert gebruikt vind ik echt niet kunnen :P
Aan TS, ik heb geen zin om variabelen met hoofdletters te laten beginnen, dus dat mag je zelf aanpassen :)
Gewijzigd op 05/07/2005 22:49:00 door dutchcamel
mixed str_replace ( mixed needle, mixed str, mixed haystack)
Vanaf php 4.0.5 mogen alle parameters array zijn.
De methode die dutchcamel gebruikt lijkt mij dan ook het beste en snelste.
Maar nu kun je dus de scheldwoorden met hoofdletters schrijven...
Je zult dus b.v preg_replace moeten gebruiken:
Code (php)
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
<?php
$aWoorden = array(
'#lul#si',
'#eikel#si',
'#klootzak#si'
);
$text = preg_replace($aWoorden , '****', $text);
?>
$aWoorden = array(
'#lul#si',
'#eikel#si',
'#klootzak#si'
);
$text = preg_replace($aWoorden , '****', $text);
?>
Gewijzigd op 06/07/2005 13:57:00 door Martijn B
het probleem was hoe kan ik wel tekens als &, >, . in mijn verzonden bericht kan weergeven (nu word & vervangen door de woorden -en) maar ik wil echt het teken zelf kunnen weergeven.... hoe doe ik dat?
haal deze weg !!! door dat worden alle & vervangen door EN