homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

How to check for a specific text on any web page

 1:36 pm on Mar 15, 2013 (gmt 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)

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)

Welcome to WebmasterWorld, jennypretty.

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved