[PHP] detecting spam keywords with stripos

2009-05-29 Thread Merlin Morgenstern
Hi there, I am matching text against an array of keywords to detect spam. Unfortunatelly there are some false positives due to the fact that stripos also finds the keyword inside a word. E.G. "Bewerbung" -> "Werbung" First thought: use strpos, but this does not help in all cases Second though

Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Per Jessen
Merlin Morgenstern wrote: > Hi there, > > I am matching text against an array of keywords to detect spam. > Unfortunatelly there are some false positives due to the fact that > stripos also finds the keyword inside a word. > E.G. "Bewerbung" -> "Werbung" > > First thought: use strpos, but this d

Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Tom Worster
On 5/29/09 5:36 AM, "Merlin Morgenstern" wrote: > Does somebody have an idea on how to make my function better in terms of > not detecting the string inside a word? i agree with per. learn pcre: http://us.php.net/manual/en/book.pcre.php as for successfully filtering spam by keyword matching: go

Re: [PHP] cURL loop?

2009-05-29 Thread Daniel Brown
On Thu, May 28, 2009 at 23:31, espontaneo wrote: > > Hello! I am currently working on a script that will scrape data from a > property advertising web page. The web page has multiple pages. What I'm > getting is only the first page. What I wanted to do is to use curl to scrape > all the data from

Re: [PHP] Hebrew Directory Names

2009-05-29 Thread Tom Worster
On 5/28/09 2:06 PM, "Nitsan Bin-Nun" wrote: > preg_replace("/([\xE0-\xFA])/e","chr(215).chr(ord(\${1})-80)",$s); ... > The preg_replace() above convert the Hebrew chars into UTF8. that preg_replace takes a byte string $s and: - leaves bytes with value 0-127 intact - converts bytes with value

Re: [PHP] Hebrew Directory Names

2009-05-29 Thread Nitsan Bin-Nun
Your point is right but these code point does not exist in the subject string so this isn't the issue here. I'm really stuck at this one :S Thank you again for trying to help! On Fri, May 29, 2009 at 2:40 PM, Tom Worster wrote: > On 5/28/09 2:06 PM, "Nitsan Bin-Nun" wrote: > > > preg_replace(

Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Merlin Morgenstern
Per Jessen wrote: Merlin Morgenstern wrote: Hi there, I am matching text against an array of keywords to detect spam. Unfortunatelly there are some false positives due to the fact that stripos also finds the keyword inside a word. E.G. "Bewerbung" -> "Werbung" First thought: use strpos, but

Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Stuart
2009/5/29 Merlin Morgenstern : > > > Per Jessen wrote: >> >> Merlin Morgenstern wrote: >> >>> Hi there, >>> >>> I am matching text against an array of keywords to detect spam. >>> Unfortunatelly there are some false positives due to the fact that >>> stripos also finds the keyword inside a word. >>

Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Bastien Koert
On Fri, May 29, 2009 at 10:02 AM, Merlin Morgenstern wrote: > > > Per Jessen wrote: > >> Merlin Morgenstern wrote: >> >> Hi there, >>> >>> I am matching text against an array of keywords to detect spam. >>> Unfortunatelly there are some false positives due to the fact that >>> stripos also finds

[PHP] recipes anyone?

2009-05-29 Thread PJ
I'd like to get some input on how to deal with recipes. use html pages to store and display, XML or db or... ? And what about clips, like flvs ? TIA. -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p..

Re: [PHP] recipes anyone?

2009-05-29 Thread Richard Heyes
Hi, > I'd like to get some input on how to deal with recipes. > use html pages to store and display, XML or db or... ? And what about > clips, like flvs ? TIA. Actual recipes? As in a pork roast? I would put them on the file system in .html files. You could use a PHP file to serve them, and have

RE: [PHP] recipes anyone?

2009-05-29 Thread Bob McConnell
From: PJ > > I'd like to get some input on how to deal with recipes. > use html pages to store and display, XML or db or... ? And what about > clips, like flvs ? TIA. > There are as many ways to do cookbooks as there are cooks. I am familiar with half a dozen, without counting the professional p

Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Per Jessen
Stuart wrote: > I'm sure you could integrate SpamAssassin or similar because at the > end of the day all those systems expect is a bunch of text. Exactly. You can run SA as a daemon (spamd) and feed data to it using spamc. Works very well. The full ruleset is probably too much, but it's easy to

[PHP] Numerical Recipe - Scheduling Question

2009-05-29 Thread bruce
Hi.. Got a need to be able to allow a user to specify the frequency to run certain apps/processes.. I need to be able to have the user specify a start Time, as well as a periodic frequency (once, hourly, daily, weekly...) as well as allow the user to specify every XX minutes... So i basically nee

RE: [PHP] Numerical Recipe - Scheduling Question

2009-05-29 Thread kyle.smith
I'm confused as to why cron doesn't work for you. It doesn't explicitly tell you when the next X occurences will be, but math does. If you schedule something to run every 5 minutes starting at 1:45 PM, it's simple work to be able to report that the next times would be 1:50 PM, 1:55 PM, 2:00 PM et

Re: [PHP] Numerical Recipe - Scheduling Question

2009-05-29 Thread Stuart
2009/5/29 kyle.smith : > I'm confused as to why cron doesn't work for you.  It doesn't explicitly > tell you when the next X occurences will be, but math does.  If you > schedule something to run every 5 minutes starting at 1:45 PM, it's > simple work to be able to report that the next times would

Re: [PHP] Numerical Recipe - Scheduling Question

2009-05-29 Thread Bastien Koert
On Fri, May 29, 2009 at 2:12 PM, Stuart wrote: > 2009/5/29 kyle.smith : > > I'm confused as to why cron doesn't work for you. It doesn't explicitly > > tell you when the next X occurences will be, but math does. If you > > schedule something to run every 5 minutes starting at 1:45 PM, it's > >

Re: [PHP] recipes anyone?

2009-05-29 Thread PJ
Bob McConnell wrote: > From: PJ > >> I'd like to get some input on how to deal with recipes. >> use html pages to store and display, XML or db or... ? And what about >> clips, like flvs ? TIA. >> >> > > There are as many ways to do cookbooks as there are cooks. I am familiar > with half a d

RE: [PHP] recipes anyone?

2009-05-29 Thread Bob McConnell
From: PJ > Bob McConnell wrote: >> From: PJ >> >>> I'd like to get some input on how to deal with recipes. >>> use html pages to store and display, XML or db or... ? And what about >>> clips, like flvs ? TIA. >>> >>> >> >> There are as many ways to do cookbooks as there are cooks. I am fami

Re: [PHP] Numerical Recipe - Scheduling Question

2009-05-29 Thread Stuart
2009/5/29 Bastien Koert : > > On Fri, May 29, 2009 at 2:12 PM, Stuart wrote: >> >> Hmm, might have to write that lot up as a blog post with some example >> code. Sometime... > > I would be very interested in that. I am developing a project where a queue > is required to manage load. Your post abov

Re: [PHP] recipes anyone?

2009-05-29 Thread Michael A. Peters
PJ wrote: I'd like to get some input on how to deal with recipes. use html pages to store and display, XML or db or... ? And what about clips, like flvs ? TIA. I believe there is already an xml format for recipes. I would either use that format to store them, or use equivalent database fields

Re: [PHP] recipes anyone?

2009-05-29 Thread Michael A. Peters
PJ wrote: Thank you gentlemen. Basically, that's what I figured. But this does give me some more stuff to mull over. The only thing I'm really wondering is if it's worth doing anything with XML. For display in a web browser, the only thing you should do with xml is what browsers know how t

Re: [PHP] recipes anyone?

2009-05-29 Thread Michael A. Peters
Bob McConnell wrote: > like a web based front end, > exclusion of specific ingredients due to allergies and being able to > attach dated notes about alterations or substitutions I try each time That sounds wicked. One of my brothers is allergic to corn. Being able to flag ingredients that contain

Re: [PHP] Confirmation email caught by spam filter

2009-05-29 Thread Dee Ayy
Are you sure it's a PHP thing? The way I have some of my email accounts setup is that I only accept email from folks in my address book. If I just registered a new account somewhere, chances are I do not have them in my address book, so it will go to the Junk/Spam folder. If this is your issue,

Re: [PHP] recipes anyone?

2009-05-29 Thread Shawn McKenzie
Michael A. Peters wrote: > Bob McConnell wrote: >> like a web based front end, >> exclusion of specific ingredients due to allergies and being able to >> attach dated notes about alterations or substitutions I try each time > > That sounds wicked. > One of my brothers is allergic to corn. > Being

[PHP] Re: Numerical Recipe - Scheduling Question

2009-05-29 Thread Shawn McKenzie
bruce wrote: > Hi.. > > Got a need to be able to allow a user to specify the frequency to run > certain apps/processes.. I need to be able to have the user specify a start > Time, as well as a periodic frequency (once, hourly, daily, weekly...) as > well as allow the user to specify every XX minut

RE: [PHP] Re: Numerical Recipe - Scheduling Question

2009-05-29 Thread bruce
hey shawn... strtotime (or something similar) might just work i'll always know the interval... which can be used to compute the nexttime, which then becomes the next starttime... i'm assuming there's an equally simple way to find the last day of a given month if i choose that as an interval as w

RE: [PHP] Re: Numerical Recipe - Scheduling Question

2009-05-29 Thread bruce
hey shawn... on the strtotime function... it appears to simply take intervals of a string type.. is there a way to have it take intervals of the number of secs? or is there another time function that takes the current date/time, and allows you to add an interval in secs? thanks -Original

Re: [PHP] Re: Numerical Recipe - Scheduling Question

2009-05-29 Thread Stuart
2009/5/29 bruce : > hey shawn... > > on the strtotime function... it appears to simply take intervals of a string > type.. > > is there a way to have it take intervals of the number of secs? or is there > another time function that takes the current date/time, and allows you to > add an interval in

Re: [PHP] Confirmation email caught by spam filter

2009-05-29 Thread LAMP
partially, this is my issue. but it looks like the message "add the email address ord...@mydomain.com to you address book" didn't help. at least not noticeable. afan Dee Ayy wrote: Are you sure it's a PHP thing? The way I have some of my email accounts setup is that I only accept email fro

Re: [PHP] recipes anyone?

2009-05-29 Thread PJ
Michael A. Peters wrote: > Bob McConnell wrote: > > like a web based front end, > > exclusion of specific ingredients due to allergies and being able to > > attach dated notes about alterations or substitutions I try each time > > That sounds wicked. > One of my brothers is allergic to corn. > Bein

Re: [PHP] recipes anyone?

2009-05-29 Thread PJ
Shawn McKenzie wrote: > Michael A. Peters wrote: > >> Bob McConnell wrote: >> >>> like a web based front end, >>> exclusion of specific ingredients due to allergies and being able to >>> attach dated notes about alterations or substitutions I try each time >>> >> That sounds wicked.

Re: [PHP] Re: Numerical Recipe - Scheduling Question

2009-05-29 Thread Shawn McKenzie
bruce wrote: > hey shawn... > > strtotime (or something similar) might just work > > i'll always know the interval... which can be used to compute the nexttime, > which then becomes the next starttime... > > i'm assuming there's an equally simple way to find the last day of a given > month if i