Ik ben bezig met een soort woorden filter.
Nou wil ik de woorden die gefilterd moeten worden uit een txt bestand halen nou zet ik het javascript in php en zegt die
Parse error: parse error, unexpected T_INCLUDE in /home/skyclub/public_html/fotoboek/fotoboek1.php on line 48
lijn 48 is dit in het script
echo " cmp=" " "" include('woordenfilter.txt');"" " ";";
iemand een id ??
Nou wil ik de woorden die gefilterd moeten worden uit een txt bestand halen nou zet ik het javascript in php en zegt die
Parse error: parse error, unexpected T_INCLUDE in /home/skyclub/public_html/fotoboek/fotoboek1.php on line 48
lijn 48 is dit in het script
echo " cmp=" " "" include('woordenfilter.txt');"" " ";";
iemand een id ??
code:
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
| <?
echo "<SCRIPT LANGUAGE='JavaScript'>";
echo "<!-- Hide from JavaScript-Impaired Browsers ";
/* This routine does not create an alert box. Instead
it simply replaces any words you decide are offensive
at your Web Site with curse symbols. The "smut" string
may be replaced with "xxx" or anything you deem more
appropriate. The "cmp" string should be comprised only
of words you don't wish to appear in postings or
submissions at YOUR Web Site. (Some folks use this
function to "bleep out" competitor's names) If you
lengthen or shorten the list, be sure to change the
stop number in the "for" loop (i<16 here, because 16
words in the list.
Don't forget a space after the last word in your own
list of "forbidden" words. */
echo "function smutEngine() {";
echo " smut=" " "#@&*%!#@&*%!#@&*%!" " ";";
echo " cmp=" " "" include('woordenfilter.txt');"" " ";";
echo " txt=document.post.reactie.value;";
echo " tstx=" " "" " ";";
echo " for (var i=0;i<999999999999;i++){";
echo " pos=cmp.indexOf(" " " " " ");";
echo " wrd=cmp.substring(0,pos);";
echo " wrdl=wrd.length";
echo " cmp=cmp.substring(pos+1,cmp.length);";
echo " while (txt.indexOf(wrd)>-1){";
echo " pos=txt.indexOf(wrd);";
echo " txt=txt.substring(0,pos)+smut.substring(0,wrdl)";
echo " +txt.substring((pos+wrdl),txt.length);";
echo " }";
echo " }"
echo " document.post.reactie.value=txt;";
echo "}";
echo "</script>";
?> |