homepage Welcome to WebmasterWorld Guest from 54.211.97.242
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
jennypretty



 
Msg#: 4555267 posted 1:36 pm on Mar 15, 2013 (gmt 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]

 

skoff

5+ Year Member



 
Msg#: 4555267 posted 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..

coopster

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



 
Msg#: 4555267 posted 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