/ Published in: PHP
Place snippet in functions.php. Works with the Shylock Adsense plugin (http://planetozh.com/blog/my-projects/wordpress-plugin-who-sees-ads-control-adsense-display/)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function scratch99_fromasearchengine(){ $ref = $_SERVER['HTTP_REFERER']; $SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.'); foreach ($SE as $source) { } return false; } Call: if (scratch99_fromasearchengine()) { INSERT YOUR CODE HERE } }
URL: http://www.scratch99.com/2008/09/avoid-smart-pricing-show-adsense-only-to-search-engine-visitors/