Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    25
    Thanks
    2
    Thanked 0 Times in 0 Posts

    PHP Virus problem

    I have a problem in my web site i have add leave comments option.
    But someone is puting virus links on it how to stop people to putting virus links. You can check it via this link:http://www.saughat.com/saughat/Saugh...9/comments.php

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Quote Originally Posted by yasirjamal View Post
    I have a problem in my web site i have add leave comments option.
    But someone is puting virus links on it how to stop people to putting virus links. You can check it via this link:http://www.saughat.com/saughat/Saugh...9/comments.php
    1. Remove the post a comment feature.
    2. Strip url tags out / use selective url filtering.
    3. Moderate the incoming comments.
    4. Use a user management system disallowing anonymous feedback.

    I didn't visit you're site though. Just some of the standard things you should consider.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    Regular Coder kokjj87's Avatar
    Join Date
    Sep 2008
    Location
    Singapore
    Posts
    279
    Thanks
    1
    Thanked 55 Times in 54 Posts
    The easiest way is to strip out the html tag in your comment, you don't need them anyway..
    PHP Code:
    //this will strip all tags, but allowing, B and STRONG tag...
    $comment strip_tags($comment'<b><strong>'); 
    http://php.net/strip_tags

    Or if you insist on allowing links on your comment.. follow Fou-Lu suggestion(moderate comment etc....)...

  • #4
    New Coder
    Join Date
    Nov 2007
    Posts
    41
    Thanks
    5
    Thanked 1 Time in 1 Post
    Captcha?!


  •  

    Posting Permissions

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