Welcome to WebmasterWorld Guest from 54.159.50.111

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


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:
example.com/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 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.

Thanks.

[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)

Administrator

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

joined:July 31, 2003
posts:12533
votes: 0


Welcome to WebmasterWorld, jennypretty.

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