#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2008
    Posts
    26
    Rep Power
    0

    How to check for a specific text on any web page


    Hello,

    I am a newbie in PHP. I like to have one question about how to check for specific text on any web page.

    I have a dating site. I deleted some members but they are still indexed on Google so I want to enter a message on my webpage for those who are no longer existed on my database. Also, I have ads on my site, I don't want to place ads on these non-existing members pages.

    If you look at this:
    vietdating.us/member/51709/pictures/view/21618/30884/

    There is an error message about "Member was not found"


    This is what I did but it didn't return anything:

    <?php } if (strpos($error_message, 'Member was not found') != false) { ?>
    <p>Welcome to Vietdating.us</p>

    How do I check for this text "Member was not found" on any web page, it it is found, then enter my own message.

    Thanks.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    667
    Rep Power
    6
    I'm a bit off of what you are attempting to do. Are you wishing to mention something on these pages that are cached by Google and mention the user no longer exists? If this is so, this is impossible. This is a cached version of your page, and really has nothing to do with your site. It was a picture taken of such a page, and now stored and being fetched from Google's servers.

    As far as searching for this "Member was not found" item, you have roughly 2 options. 1 is to simply run a search across all files in your site. Other is a search on the database. Something like this may be stored in an error listing which would hold all errors in 1 spot to be referenced by any page of the site. The "Member was not found" is simple being referenced by id, most likely, especially if you offer multiple languages.
    Last edited by Triple_Nothing; March 15th, 2013 at 08:51 AM.

IMN logo majestic logo threadwatch logo seochat tools logo