Need some help

Discussion in 'Programming' started by getatune, Feb 5, 2009.

  1. #1
    I have a php script that adds a site to a database so yeah. I want to make the script check if the site is ex. pornhub.com or has inappropriate language in it. How would i do this
    Ex.
    I want to make it check if porn is in $url anywhere.
     
    getatune, Feb 5, 2009 IP
  2. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    if (preg_match('/(porn|sex)/i', $url))
    Code (markup):
    ? ish
     
    decepti0n, Feb 5, 2009 IP
  3. getatune

    getatune Well-Known Member

    Messages:
    1,360
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    125
    As Seller:
    100% - 2
    As Buyer:
    100% - 0
    #3
    hmm thanks. Though I already got it but I may use this later
     
    getatune, Feb 5, 2009 IP