1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I disable certain pages in a dynamic site

Discussion in 'YouTube' started by manhal, Mar 13, 2010.

  1. manhal

    manhal Newbie

    Joined:
    Apr 15, 2009
    Messages:
    49
    Likes Received:
    2
    I have an auto-updated youtube api website where the site urls are always in the form

    www.mydomain.com/video/yt.php?$TITLE

    or

    www.mydomain.com/video/$ID/$TITLE.html

    where $ID is the video id and $TITLE is the video title.

    Now I want to disable/ban any page that the $TITLE contains a certain word (e.g. sex).

    Any idea how can I do that?
     
  2. hollinger

    hollinger Junior Member

    Joined:
    Apr 28, 2008
    Messages:
    189
    Likes Received:
    34
    You could use regular expressions to do that.

    PHP:
    <?php
    if(eregi('badword'$your_title)) {
     
    // found bad word and now do something
    }
    ?>
     
  3. manhal

    manhal Newbie

    Joined:
    Apr 15, 2009
    Messages:
    49
    Likes Received:
    2

    i will try this then.
    Thank you hollinger