Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How to check for a specific text on any web page

1:36 pm on Mar 15, 2013 (gmt 0)

New User

joined:Aug 3, 2012
posts: 5
votes: 0


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:

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 Example.com</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.


[edited by: tedster at 4:46 am (utc) on Mar 16, 2013]
[edit reason] switch to example.com - no real domains, please [/edit]

11:00 pm on Mar 15, 2013 (gmt 0)

Junior Member

5+ Year Member

joined:Nov 16, 2008
posts: 136
votes: 0

This request make no sense.. you should edit the code directly and replace the message with what you want..
11:59 am on Mar 19, 2013 (gmt 0)


WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
votes: 2

Welcome to WebmasterWorld, jennypretty.

You can create a custom 404 Not Found page using PHP to personalize the message and even offer alternative suggestions.