str_replace

Discussion in 'PHP' started by lowridertj, Jul 16, 2007.

Thread Status:
Not open for further replies.
  1. #1
    How can i take logged entry's that contain a web link for
    example someone makes a post on a board:

    hey check this site out http://www.somesite.com/?refer=123


    this is just an example. However How can I make that anything posted in the form of a link is edited with **removed**


    so it would look like this:
    hey check this site out **removed**


    Thanks in advance,
    Tj
     
    lowridertj, Jul 16, 2007 IP
  2. lbalance

    lbalance Peon

    Messages:
    381
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    maybe something like this:

    this finds URL's and will replace it with the text you mentioned, where $url is the variable holding the original url and $message will hold **removed** once its parsed.
     
    lbalance, Jul 16, 2007 IP
    srobona and lowridertj like this.
  3. lowridertj

    lowridertj Well-Known Member

    Messages:
    2,882
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    195
    #3
    thank you very much.

    rep added.

    TJ
     
    lowridertj, Jul 16, 2007 IP
Thread Status:
Not open for further replies.