dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Finding 'http' or 'www'

  1. #1
    Join Date
    Dec 2004
    Posts
    117

    Finding 'http' or 'www'

    I use a guestbook script which sadly get s abused by spammers.

    99.9% of the span contains the text 'http' or 'www'. Is there a way I can search for both of those strings and if I find them - exit the script.

    I have no experience with PERL so I need help with this one.

    Thanks,

    j

  2. #2
    Join Date
    Dec 2002
    Location
    Pleasanton, CA
    Posts
    2,132
    That SEEMS like a pretty simple problem

    if ($message =~ /(http|www)/) { exit; } # regular expression

    BUT
    I have no experience with Perl (not capitalized)
    Do you know where to put that?
    Do you know how the $message variable gets set?
    Do you REALLY want to exit; I think not!
    What about valid posts to your guestbook that contain those strings?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles