Bad Word And SHOUTING Filter...
Is there a simple way to go through a textarea input determine if certain words from a list (an array?) are present? And, related, sort of... Is there a simple way to determine if a textarea contains "too many" upper case characters ("shouting")? That is, count how many are UPPERCASE and how many not?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Word Filter
I know there are many topics regarding Word Filters but I couldn't find one for this particular problem. I want to create a Word-Filter script which ignores workarounds such as spaces (B adword) or BB-codes (Badword). Any ideas on what specific code snippets to prevent those?
Array Word Filter?
got a comment/blog type thingy and in the users preferences they have the option to turn a bad language filter on/off. Im just wondering the quickest way to implement this to view the output? You think put the words into an array and if the word filter is true, then how would i go through all the array of bad words and replace with *** and would this be quick or would it delay viewing the output?
Offensive Word/phrase Filter
I've got a function that is being used to filter messages before they're inserted into a database that gets rid of any foul language and replaces it with either **** or an alternate word/phrase. The problem is it replaces parts of other words. For example, the word Assault gets replaced as: ***ault. Can someone please help me modify this so it only replaces whole words? I was thinking maybe putting spaces around the word to check it, but this will cause it to fail on words at the beginning of the text or with punctuation after or around the word (like "bleep" or bleep.) here's the function: Code:
Php Filter
I made a chat room with php and now im trying to make a bad word filter cna someone help me? not to code but to lead me in the right direction heres the script i have now thats not working Code:
Php Content Filter
I have made this script to filter content based on the given url. i need to make all the links on the page go through this script, so i added an str_replace and its not working, the links don't get modified.
Filter Arrays
there's an array where i want to remove one entry. so i use PHP Code:
Input Filter?
i have been searching for a good input filter class or how-to guide. All I found were vague concept descriptions or alpha-release or more than a year old, dead projects. Isn't there a comprehensive class to filter user inputs for specific purposes such as display, sql storage and filter features such as specific html tags, filter JS, etc etc?
Content Filter...
Would it be possible to make a PHP script that actted as a simple proxy server? I want to build a script that IE uses as a proxy, then i want to check the page for bad words and if its okay display it.
Drop Down Filter
I've got two drop down menus that I'm using to filter some data. It works when the user selects an option from both menus but always return ZERO records when only one of out the two menus have been set. My code POSTS the ID from each menu then puts that ID into the WHERE clause of an SQL query. Code:
Gzip Filter
I want to config gzip on apache server so that it compress everything except streaming files and images. I did AddOutputFilterByType DEFLATE text/plain text/javascript text/html. But it seems that certain request for file/image data gets gzipped as well. for example client sends a request http://myhost/file_streamer.php?id=101, my file_streamer.php respond with: Code:
Strip_Tags Using Filter
I am trying to make code that will let users upload images and embeded object tags via a simple web form. I have it working correctly, it does what i want it to: user uploads say from a web form. it gets dumped into the sql table. this is the "behind the scenes" code that works on the form submission: Code:
Image Filter
The image size filter works but not the file extension filter. Would like a check to see if file exsists too. Code:
Spam Filter
anyone know a good spam filter for my linux email box...
How To Filter The Words In HTML ?
I face some problem that I want to filter the all words in HTML. Example: Before Filter: <div id="pp"hello man <br/Thank's for your answer. </div> After Filter: <div id="pp"<br/</div> What I want is reserve all HTML tags but words. Is there any good packages or classes or suggestion?
Creating Profanity Filter
I'm creating a profanity filter for my message board. I've created the following code: // $filter is the array that contains the bad words foreach ($filter as $word) { $name = eregi_replace($word,"*****",$name); $email = eregi_replace($word,"*****",$email); $subject = eregi_replace($word,"*****",$subject); $body = eregi_replace($word,"*****",$body); } The code works, but every word is being replaced by "*****" (5x*). That is not what I want. What I want to do is replace "doh" with "***" and "superdoh" with "********".
PHP Mail() And AOL Spam Filter
dodging AOL's spam filters when mail()ing from PHP? We are having trouble with this code: $fromEmail = 'aValidAddress@thisHostAccount.com' $headers = 'MIME-Version: 1.0' . " "; $headers .= 'Content-type: text/html; charset=iso-8859-1' . " "; $headers .= "From: This Foundation <$fromEmail> "; $headers .= "Reply-To: This Foundation <$fromEmail> "; $headers .= "Return-Path: $fromEmail "; $headers .= "Message-ID: <".time()." TheSystem@". $_SERVER['SERVER_NAME']."> "; $headers .= "X-Mailer: PHP v".phpversion()." "; mail($to, '$subject, $msg, $headers); We had originally been sending bounces to a different Return-Path address (see below) but simplified this after AOL flagged all the emails as spam. Also the To field is being set like this RealFirstName RealLastName <Addressand the message has a greeting using the RealFirstName. mail($to, '$subject, $msg, $headers, "-f bounce3@gnosports.com");
Adding A Filter To My Shoutbox
I have a simple shoutbox thingy that I use to display simple messages. It works fine as it is, but there is no error control or filtering etc.. I would really like to add a swear filter to it, but I'm not sure how. I tried using PHP Code:
Color Mask/Filter With GD?
Has anyone had any luck with trying to create a image mask with gd. I've gone through most of the manual and the closest thing I could get was http://www.php.net/manual/en/functi...phablending.php I want to put a color layer over and image that makes it look like it has a blue tint or red tint etc. The GD Manual isn't really any help either.
Displaying Images With A Filter
Wondering if someone can point me in the right direction. Im trying to display images from a directory, but i need to filter them. Like a wildcard, for example to display all images ending with *1h.png or to display images starting with cpu0*.*
Image Size And Ext Filter
I have been testing my image filters and have a few problems, for some reason it blocks .exe, .rar, .zip and a few others i have tested and does the if else code, but .psd .pdf (i have yet to test more)slip through the else code(they dont get uploaded but it creates a empty record. Not what i want. (why would it do that when in my array i only include, jpg, jpeg, gif and png files) The other problem is that it recongnises a jpeg if over the size limit and does the else code but png files bigger that the allowed size skip the else code and create an empty record(they dont get uploaded either) Code:
Image Upload Filter
I have this code i usethat works fine, except that any filr can be uploaded and any size. How would i add some code to check that the file is a jpeg, gif or png and is under 1 meg? Code:
Filter Links Out Of Comments
last week I posted a link to my site where people can leave comments and some low-life decided to post links on that page. Is there someway to filter out links? I dont really want to use the htmlspecialchars() or the htmlentities() to simply disable them, I want to block them altogether. Maybe some way to filter out "www" or something?
Filter To Omit Based On Certain Url
I have a script that will send an error for 404 emails. I want to exclude urls from a certain directory. How can I make it so they wont submit if /example is in the url? The code works fine I just want to filter out. Also you will see that I have defined REQUEST_URI this is because I have php on IIS, not my choice. I am somewhat of a noob, so if you can make your answer as simple as possible I would really appreciate it. Here is code:
How Do I Filter A Table Of Links ???
can anyone suggest a way of dissplaying a table of links from a mysql table but not display a link if a value is preasent in a colum of the mysql table ?
Filter Results Of Query
I am modifying some pages in CRE Loaded. allprods.php list all currently active products and I added a manufacturers column that displays who makes that product. I want to allow shoppers to filter the product list so that it shows only products from a particular manufacturer. I have gone through several scenarios in my mind, but nothing I've thought of seems simple and bullet proof. One of the issues is that the all products query includes all manufacturers. If I were to put a variable in the query to select only a particular manufacturer, how would I code it so it does not interfere with the all products query? Would logic based upon the value of a form action work? If form action exists, someone wants to filter. If not form action or form action = all, then they want the whole list. Seems like filtering a list is pretty common and there should be an easy solution.
NuSOAP Problems With Google Web API + Filter
The Google Web API's "Filter" used to work for me: I set it to true using PHP/NuSOAP and didn't get multiple pages from the same domain, or if so, at most one additional one and this being marked specifically. Lately, it doesn't work anymore for me. Example? Compare this <http://blog.outer-court.com/search-css/?q=google+blog> result with the official result on Google for <Google Blog>. The first domain hits me thrice in the first example.
Bypass Hotmail Junk Filter
I am sending mail through php mail() function, mail goes in inbox in yahoo.gmail,other but only in hotmail it goes in junk. first i thought there was a problem with the text then we tested the text through our hosting mail account and when finally we succeeded in bypassing hotmail filter the mails started going in inbox if i sent them from a mail account i create at the server test@... but when i used the same text with php mail() function it still is going in junk plz see below the code i used i added alot of headers but it still goes in junk plz help how to bypass junk .....
[error] An Unknown Filter Was Not Added: PHP
I'm getting this error in my error_log in apache. Can anyone offer any assistance in fixing the problem? I'm using RH 9 with apache 2.0.53 and PHP v4.3.11 [Fri Apr 29 09:32:03 2005] [error] an unknown filter was not added: PHP .........
[error] An Unknown Filter Was Not Added: PHP
Anyone know why this message would appear in my error_log. My PHP code executes fine...but it is outputting this to my error_log and I cannot figure out why. I've been looking for a couple days...but have not found any reason/fix on the web for this message. My php.ini and php.conf look fine.
Mail() Blocked By Spam Filter
I never had problem with this PHP page with mail() function with at least 5 different servers, but email sent through the server of this "T" company tends to get blocked by spam filters. I tested with my different email accounts and these are the results. * The mail is delivered to the "Inbox" of my AOL account. * The mail is delivered to the "Bulk Mail" folder of my hotmail and msn accounts. * The mail is delivered to the "Spam" folder of another account of mine. * The mail is not delivered to any of my two university accounts. One thing I noticed is that this "T" company hasn't setup the "From" section, unlike the other servers that I worked with before, so the mail is coming from "Nobody" <nobody@________>. I suggested the tech person of the company update the "php.ini" file, but he doesn't admit that's the issue. I tried manually adding the From with PHP coding with "$headers," but it didn't make any change.
Make A Dropdown-menu Filter?
I have a dropdown menu which is supposed to filter a table to show results for professionals, students or all. But I don't really know what I'm doing. This is what I have so far. Code: Initially, I was able to filter for students or professionals, but since trying to have an all option (students and professionals) it has gone to pot, and I keep getting errors. I know that my quotation marks are not right, but I can't think of a solution. I would be more than happy to see any ideas, even if they are completely different to mine!
Filter Mysql Query With File_exists() ?
i am trying to filter the results of a mysql query with file_exists() i have a database of products with one of the columns of data being the product image url. i want to retreive the results for only the proucts where the pImage exists. i have the following code:
Howto Use Php As Filter For HTML Files? Curl?
In short, how to modify selected tags/sections of a HTML file, using PHP as the "modifier"/filter? I would have thought this was a very common usage for PHP... I have a set of existing .html files that are plain and ugly. I'd like to create a showdoc.php filter that adds consistent menus, css, look and feel, so that http://me/showdoc.php?d=story shows a nicely formatted http://me/story.html It: * puts in a nice standard header * opens story.html * extacts all <link> and <script> tags from the story <head> and adds them to the output <head> * extracts everything between <body> and </body> * rewrites all non-absolute hrefs e.g. <a href="other.html"> to <a href="showdoc.php?d=other"> * closes story.html * puts in a nice standard footer I realize I can do this by editing all the .html files instead, but can't I just use php as a filter? Am I the first person to want to do this? How? * I _really_ want to avoid using regexps to match e.g. body and hrefs, because there are so many caveats involved. Multiline tags, attributes, for starters. Or how about <nasty attr="</body>"></nasty> (not sure that really is legal, though...) * xml_parse() parses XML and HTML is not XML (e.g. valid HTML missing </end> tags) so xml_parse is out. Or what? * Since I want to preserve all the <body> except the rewritten hrefs, if there is a parser involved, I'd like for any parser to produce output that is easy to re-flatten when generating output. There are examples out there using CURL, but they often are so simple that they don't print out *anything* on their own and only the output of curl_exec(). In any useful application, wouldn't everyone have to extract selected info from the retrieved web page? What do CURL users do?
Simple Filter Of Database With $_GET And Select SQL
I need help with my logic statement with a simple search engine on a MySQL table. I have three form text input fields named f_name, l_name and dept. I am using the GET method to gather data the user enters in each input field. So far I have been able to build a check to see that the submit has been clicked but I am having trouble with assembling the SQL statement because I need for the search engine to be able to filter the results based on the information provided in 1-3 of the fields. I could use if statements with some and clauses but that would mean that I would have to account for each combination. Something like If(($_GET[‘f_name’] != “”) || ($_GET[‘l_name’] !=) || ($_GET[‘dept] !=)){ $sql = "SELECT * FROM facform WHERE f_name LIKE '$_GET[f_name]', l_name LIKE '$_GET[‘l_name]', dept LIKE '$_GET[dept]' ”;} The problem with this is that I would have to get every combination and it’s not very scalable. How can I create this SQL statement dynamically? Code:
Image Type And Size Filter For Upload
I have this code that works well for me.Just need the added function to check that "uploadFile" is a jpeg, jpg, gif or png and is no bigger than a meg. Code:
Company's Form Mail Script Jams To Spam Filter
I have a problem, because we have a simple script that sends mail from (our client) company's website to that company's boss. But just some days ago post stopped coming, suppose because that email provided he's using implemented more strong spam filter after some spamming attacks. Now that program in my opinion seems to think that our form mail is spammer! I suppose it must be about header information. How can I get our form working again? We only have used simple mail command with to, subject and message - no additional headers. But now? ************************* Here is docs from php site, so you dont have to find them :-) Example 2. Sending mail with extra headers. <?php mail("nobody@example.com", "the subject", $message, "From: webmaster@{$_SERVER['SERVER_NAME']} " . "Reply-To: webmaster@{$_SERVER['SERVER_NAME']} " . "X-Mailer: PHP/" . phpversion()); ?> The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option. You may need to add the user that your web server runs as to your sendmail configuration to prevent a 'X-Warning' header from being added to the message when you set the envelope sender using this method. Example 3. Sending mail with extra headers and setting an additional command line parameter. <?php mail("nobody@example.com", "the subject", $message, "From: webmaster@{$_SERVER['SERVER_NAME']}", "-fwebmaster@{$_SERVER['SERVER_NAME']}"); ?>
Php Script To Filter A Text File And Extract Lines Starting With Keyword?
For a class, students are going to run an experiment on line. Each time a subject runs, his/her data is appended to one giant text file. Their own data set will be just one line starting with the keyword they gave as identification. The faculty does not want the students to be able to download and see the giant data file. He wants the students to only download and see the data that starts with their own identification tag. in unix, filtering a file to keep only the line starting with code MCB would look something like tail -f your_file_name | grep MCB from what I read. Given the concerns the faculty has for protecting the database, what do I need to look into to write a php script that would access the data file, but only show a web page with the data corresponding to the students identification code?
Php & Ms Word
I want to display a .doc file to an html page, using PHP. The doc file is located in a MySQL db. It will be used for displaying some announcements through the main web page.
COM And Ms Word
I've read "PHP and COM" by Harish Kamath and I've got a problem just at the beginning. I'm not able to create an instance of the Word application: "$word = new COM("word.application") or die("Unable to instantiate application object")". It doesn't print the die message, it is simply always "sending request to 127.0.0.1 ..." Is it a problem of "php.ini" settings? I'm using PHP4.0.6 on Windows2000 (Office2000).
COM & Word
I am trying to print a document after merging some data into it using PHP COM and it seems to be very tempremental and doesn't work at all over network printers. When I say tempremental, if it works on a machine it works, no question, but if it doesn't it just goes nowhere and doesn't say anything at all. Defintely works on Windows XP Pro, but again tempremental, once it wasn't working and I did everything possible, all office updates etc. but gave up and just re-installed windows and it worked fine. Windows 2000, i think i've had it working Windows 2000 Server, not working. All using Office 2000, but even tried the Office 2003 on Windows 2000 Server and nothing at all.. :( It seems very badly documented. The code I use to print: (a simplified just to do the task) <? $empty = new VARIANT(); com_load_typelib('Word.Application'); $word = new COM('word.application') or die('Unable to load Word'); print "Loaded Word, version {$word->Version} <br/>"; $word->Documents->Open("c:/templates/Options.doc"); $output=""; $word->ActiveDocument->PrintOut(0,0,0,$output); ?> Is there any known good resources for doing this? Can anyone shed any light on this?!
PHP, COM And WORD
I'm having some difficulties with PHP and COM (don't worry I can connect to MS WORD and do stuff). Having desperately Google'd it for 6 hours, here is my lays my last hope.There are two things (Actually three) : 1) a) I want to be able to use styles in WORD to format my created word document. I looked at the list but I just can't seem to find the right command. b) If there is no such use, I want to learn how to create my own styles (the company I'm developing the project has customized heading and subheading styles). So I can mimic Word's settings. 2)I'm having encoding problems. My mysql dbase and browser are working on UTF8. The problem is when I create a word document and dump data on it, the special characters just go crazy. I tried $word->Documents[1]->TextEncoding=20905; but it doesn't seem to work. Maybe I messed with the syntax but code generates no errors. Just crap letters on special characters.
PHP And Word COM
I've just starting to use the COM library with Word 97 and I can create new documents based on the example given in the php manual. I'm running PHP 4.0.4 using OmniHTTPd on a Windows 98 machine - the final version will run from a NT 4.0 server. My problem - I want to do a search an replace to tailor a Word template. The code I have been trying at the foot of this message - basically, all I am doing is converting working VBA into PHP syntax. But PHP crashes as soon as it hits find->execute(). Code:
MS Word To .gif
I need to create preview-images from MS Word documents using PHP. Any Idea how I could accomplish this?
,php To .htm To Ms Word
I've written a (single-page) script that works like this; If no values are posted to it, the script creates a form page for a user to fill in and 'submit'. If values are posted to it (i.e. the user filled in the form), the script renders a page of html with the user-supplied values. Straightforward stuff, however, if values are posted I'd like the rendered page to open in MS word for further editing, instead of the users default browser. What steps can I take to acheve this?
PHP/XML To Word
We use an intranet for the generation of quotes for customers. Once a salesman has selected the quote they can then open it as a word document to edit the details. The word document comes with a customized header for each geographical region. Recently one of the offices moved so we went to the webserver and updated all of the gif's with the new address which will appear before the page is converted to word. Once its converted to word however, the old address appears. I'm at a loss.
Sorting By Word?
Okay, I am making a member database, and when I print it out I want it to display the list by rank. Unfortantly, I stored Rank as a word. I could make a sort function that would be quite extensive and probably take a long time to execute every time... ..Or, is there anyway I can specify in SQL: Put this on the top of the list if "rank='General'" and then next if "rank='Captain'", and so on? I think if this was possible it would take a lot less time to execute... Or else I will probably have to redesign much of the site with numerical ranks instead. Thanks for any answers/advice.
|