adrian5750
New Member
HI Folks
I'm very much a PHP newbie here - but have managed to successfully 'adapt' some 'guestbook' code to filter out some of the inevitable pornospam....
The fragment in question is this.....
if (preg_match("/http", ($comment))) {
exit();
}
...which works fine if the spam contains http<space> - but fails to spot httpsomethingelse
Is there the equivalent of the old DOS wildcard * - so that my preg_match will pick up http-without-a-space-after-it ...?
I'm sure that there must be - but a web-trawl very quickly got me in much deeper than I wanted to be <g> - and I'm hoping that somebody out there could point me in the right direction....
(Looks like I'm going to have to learn another programming language.... I'm getting tooo old for this ! <g>)
Thanks in advance
Adrian
I'm very much a PHP newbie here - but have managed to successfully 'adapt' some 'guestbook' code to filter out some of the inevitable pornospam....
The fragment in question is this.....
if (preg_match("/http", ($comment))) {
exit();
}
...which works fine if the spam contains http<space> - but fails to spot httpsomethingelse
Is there the equivalent of the old DOS wildcard * - so that my preg_match will pick up http-without-a-space-after-it ...?
I'm sure that there must be - but a web-trawl very quickly got me in much deeper than I wanted to be <g> - and I'm hoping that somebody out there could point me in the right direction....
(Looks like I'm going to have to learn another programming language.... I'm getting tooo old for this ! <g>)
Thanks in advance
Adrian