Black Hat Forum
Go Back   Black Hat Forum > Black Hat SEO Forum > Cloaking and Content Generators

Cloaking and Content Generators Discuss Cloaking, Doorway pages and Automatic content generators for search engine optimization

Search
 
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-02-2008, 06:23 AM
Amnesic's Avatar
Newbie
 
Join Date: Nov 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Activity: 9%
Longevity: 33%
Today: 0/5
Default How to show searched keyword on page?

How can you do something like:

You came here searching for XXXXX
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-02-2008, 08:58 AM
Newbie
 
Join Date: Sep 2008
Posts: 4
Thanks: 5
Thanked 0 Times in 0 Posts
Activity: 0%
Longevity: 5%
Today: 0/5
Lightbulb Re: How to show searched keyword on page?

There is a plugin for this for wordpress. If you like, I can try to find it again...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-02-2008, 09:10 AM
Chris Devon's Avatar
Jr. VIP
 
Join Date: Jul 2008
Location: Croatia
Posts: 218
Thanks: 45
Thanked 74 Times in 33 Posts
Activity: 55%
Longevity: 12%
Today: 1/5
Send a message via AIM to Chris Devon Send a message via MSN to Chris Devon
Default Re: How to show searched keyword on page?

It's not so hard using php. Just look at the refferer, preg match the query, and echo the keywords
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-02-2008, 09:40 AM
Registered Member
 
Join Date: Dec 2007
Posts: 51
Thanks: 0
Thanked 2 Times in 2 Posts
Activity: 5%
Longevity: 30%
Today: 0/5
Default Re: How to show searched keyword on page?

Here's a preg-free version for those who hate preg (because it's crap and fails on some php installations):

PHP Code:

$keyword='';

$ref=$_SERVER['HTTP_REFERER'];
if (
strpos($ref,'.google.')!==FALSE) { $keyword=$_GET['q']; }
else if (
strpos($ref,'.yahoo.')!==FALSE) { $keyword=$_GET['p']; }
else if (
strpos($ref,'.live.')!==FALSE) { $keyword=$_GET['q']; }
if (
$keyword) { echo "You came here searching for $keyword"; } 
It should be fairly obvious to anyone with basic php how to add other search engines.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-02-2008, 09:58 AM
Chris Devon's Avatar
Jr. VIP
 
Join Date: Jul 2008
Location: Croatia
Posts: 218
Thanks: 45
Thanked 74 Times in 33 Posts
Activity: 55%
Longevity: 12%
Today: 1/5
Send a message via AIM to Chris Devon Send a message via MSN to Chris Devon
Default Re: How to show searched keyword on page?

Sorry to ask, it may be a dumb question; are you sure this will work? I don't have time now to test it. The strpos part is confusing me. Doesn't strpos return a number
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 10-03-2008, 01:52 PM
Registered Member
 
Join Date: Dec 2007
Posts: 51
Thanks: 0
Thanked 2 Times in 2 Posts
Activity: 5%
Longevity: 30%
Today: 0/5
Default Re: How to show searched keyword on page?

Yes, strpos returns a number, but it'll also return FALSE if no match was found, all I'm doing is testing the referrer to see if it contains google or yahoo or whatever, if it does it returns a number, else it returns FALSE.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-08-2008, 10:47 AM
Jr. VIP
 
Join Date: May 2008
Posts: 212
Thanks: 1
Thanked 31 Times in 9 Posts
Activity: 27%
Longevity: 17%
Today: 1/5
Default Re: How to show searched keyword on page?

What do u actually asking, i cant understand
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Add Your Link



Site protected by Firewall Script


Sitemap: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54