{"id":224,"date":"2007-04-29T08:08:12","date_gmt":"2007-04-29T16:08:12","guid":{"rendered":"https:\/\/jonathanwold.seguru.digital\/2007\/04\/tutorial-use-php-to-display-exclusive-content-for-google-visitors.html"},"modified":"2019-05-24T12:27:30","modified_gmt":"2019-05-24T18:27:30","slug":"tutorial-use-php-to-display-exclusive-content-for-google-visitors","status":"publish","type":"post","link":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/","title":{"rendered":"Tutorial: Use PHP to display exclusive content for Google Visitors"},"content":{"rendered":"<p>While browsing through my visitor referrals this morning, I noticed that a large number of unique visitors are making their way over to my little site from Google Images. A quick look at bandwidth usage shows that the majority of visitors are just looking for images to leech for MySpace profiles, etc, which I don&#8217;t mind so long as it doesn&#8217;t get out of hand.<\/p>\n<p>So, I thought about it for awhile. I have several thousand visitors a month showing up on my &#8220;artwork&#8221; page and they&#8217;re nearly all coming from the same place.<\/p>\n<p>What if I could have a message that would be shown only when a visitor arrived from Google Images? That might be something worth playing around with ;).<\/p>\n<p>Well, having seen similiar things before, I knew it was possible. After a bit of digging and a tip in the right direction, compliments of <a href=\"http:\/\/www.performancing.com\">performancing.com<\/a>, I found a solution.<\/p>\n<p>First, let&#8217;s see it in action. Visit my <a href=\"https:\/\/blog.jonathanwold.com\/artwork.php\">artwork<\/a> page and you&#8217;ll see it as the average visitor to jonathanwold.com will see it.<\/p>\n<p>Next, head on over to Google and do an image search for &#8220;<a href=\"http:\/\/images.google.com\/images?q=blue%20flames\">blue flames<\/a>&#8220;, one of my more popular search terms. Depending on your country, the name &#8220;Jonathan&#8221; should be somewhere in the top 10 in blue flames. Click on it and you&#8217;ll see the message for Google Images visitors. (Don&#8217;t see it? Let me know ;)<\/p>\n<p>Alrighty, now for the code! Copy and then paste the code below into notepad (or similiar plain text editor) to clear any formatting tags, then use on a PHP page and enjoy<font face=\"Courier New\">!<\/font><\/p>\n<pre><code>\r\n<!-- Exclusive Content Begins Below -->\r\n\r\n<?php\r\n\r\n\/\/ This handy little script checks to see if visitors\r\n\/\/ are arriving from Google Images and, if so,\r\n\/\/ displays an alternate message. Credit to\r\n\/\/ performancing.com for the tip! : )\r\n\r\nif (stristr(getenv('HTTP_REFERER'),\"images.google.com\"))\r\n{\r\n?>\r\n\r\nYour Message Here - You can use HTML ;)\r\n\r\n<?php\r\n}\r\n?>\r\n\r\n<!-- Exclusive Content Ends Above -->\r\n<\/code><\/pre>\n<p>And there you have it. Paste the code into the PHP page you wish to use it on and modify the HTML section as appropriate. In my particular situation, I included a CSS styled DIV tag to display my visitor notice. You can change the &#8220;referer&#8221; from images.google.com to whatever you&#8217;d like. Use your imagination :). Alrighty, and that&#8217;s that for this morning! Enjoy and if you have any questions, comments, or suggestions, add them in the comments below or send me an email.<\/p>\n<p>Have a wonderful rest of the day! : )<\/p>\n<p>-Jonathan\n <\/p>\n","protected":false},"excerpt":{"rendered":"<p>While browsing through my visitor referrals this morning, I noticed that a large number of unique visitors are making their way over to my little site from Google Images. A quick look at bandwidth usage shows that the majority of visitors are just looking for images to leech for MySpace profiles, etc, which I don&#8217;t [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"iawp_total_views":2,"footnotes":""},"categories":[13],"tags":[],"class_list":["post-224","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Tutorial: Use PHP to display exclusive content for Google Visitors - Jonathan Wold<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tutorial: Use PHP to display exclusive content for Google Visitors - Jonathan Wold\" \/>\n<meta property=\"og:description\" content=\"While browsing through my visitor referrals this morning, I noticed that a large number of unique visitors are making their way over to my little site from Google Images. A quick look at bandwidth usage shows that the majority of visitors are just looking for images to leech for MySpace profiles, etc, which I don&#8217;t [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/\" \/>\n<meta property=\"og:site_name\" content=\"Jonathan Wold\" \/>\n<meta property=\"article:published_time\" content=\"2007-04-29T16:08:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-24T18:27:30+00:00\" \/>\n<meta name=\"author\" content=\"Jonathan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@sirjonathan\" \/>\n<meta name=\"twitter:site\" content=\"@sirjonathan\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jonathan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/\"},\"author\":{\"name\":\"Jonathan\",\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/227f76cb7cb08b9ceb3ace85804bfd66\"},\"headline\":\"Tutorial: Use PHP to display exclusive content for Google Visitors\",\"datePublished\":\"2007-04-29T16:08:12+00:00\",\"dateModified\":\"2019-05-24T18:27:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/\"},\"wordCount\":375,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/227f76cb7cb08b9ceb3ace85804bfd66\"},\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/\",\"url\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/\",\"name\":\"Tutorial: Use PHP to display exclusive content for Google Visitors - Jonathan Wold\",\"isPartOf\":{\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#website\"},\"datePublished\":\"2007-04-29T16:08:12+00:00\",\"dateModified\":\"2019-05-24T18:27:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorial: Use PHP to display exclusive content for Google Visitors\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#website\",\"url\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/\",\"name\":\"Jonathan Wold\",\"description\":\"Investing in WordPress\",\"publisher\":{\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/227f76cb7cb08b9ceb3ace85804bfd66\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/227f76cb7cb08b9ceb3ace85804bfd66\",\"name\":\"Jonathan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-content\/uploads\/2022\/07\/cropped-Wold-Jonathan-scaled-1.jpg\",\"contentUrl\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-content\/uploads\/2022\/07\/cropped-Wold-Jonathan-scaled-1.jpg\",\"width\":512,\"height\":512,\"caption\":\"Jonathan\"},\"logo\":{\"@id\":\"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/blog.jonathanwold.com\",\"https:\/\/www.linkedin.com\/in\/jonathanwold\/\",\"https:\/\/x.com\/sirjonathan\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tutorial: Use PHP to display exclusive content for Google Visitors - Jonathan Wold","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/","og_locale":"en_US","og_type":"article","og_title":"Tutorial: Use PHP to display exclusive content for Google Visitors - Jonathan Wold","og_description":"While browsing through my visitor referrals this morning, I noticed that a large number of unique visitors are making their way over to my little site from Google Images. A quick look at bandwidth usage shows that the majority of visitors are just looking for images to leech for MySpace profiles, etc, which I don&#8217;t [&hellip;]","og_url":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/","og_site_name":"Jonathan Wold","article_published_time":"2007-04-29T16:08:12+00:00","article_modified_time":"2019-05-24T18:27:30+00:00","author":"Jonathan","twitter_card":"summary_large_image","twitter_creator":"@sirjonathan","twitter_site":"@sirjonathan","twitter_misc":{"Written by":"Jonathan","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/#article","isPartOf":{"@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/"},"author":{"name":"Jonathan","@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/227f76cb7cb08b9ceb3ace85804bfd66"},"headline":"Tutorial: Use PHP to display exclusive content for Google Visitors","datePublished":"2007-04-29T16:08:12+00:00","dateModified":"2019-05-24T18:27:30+00:00","mainEntityOfPage":{"@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/"},"wordCount":375,"commentCount":2,"publisher":{"@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/227f76cb7cb08b9ceb3ace85804bfd66"},"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/","url":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/","name":"Tutorial: Use PHP to display exclusive content for Google Visitors - Jonathan Wold","isPartOf":{"@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#website"},"datePublished":"2007-04-29T16:08:12+00:00","dateModified":"2019-05-24T18:27:30+00:00","breadcrumb":{"@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/tutorial-use-php-to-display-exclusive-content-for-google-visitors\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/"},{"@type":"ListItem","position":2,"name":"Tutorial: Use PHP to display exclusive content for Google Visitors"}]},{"@type":"WebSite","@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#website","url":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/","name":"Jonathan Wold","description":"Investing in WordPress","publisher":{"@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/227f76cb7cb08b9ceb3ace85804bfd66"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/227f76cb7cb08b9ceb3ace85804bfd66","name":"Jonathan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/image\/","url":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-content\/uploads\/2022\/07\/cropped-Wold-Jonathan-scaled-1.jpg","contentUrl":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-content\/uploads\/2022\/07\/cropped-Wold-Jonathan-scaled-1.jpg","width":512,"height":512,"caption":"Jonathan"},"logo":{"@id":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/blog.jonathanwold.com","https:\/\/www.linkedin.com\/in\/jonathanwold\/","https:\/\/x.com\/sirjonathan"]}]}},"_links":{"self":[{"href":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-json\/wp\/v2\/posts\/224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":0,"href":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-json\/wp\/v2\/posts\/224\/revisions"}],"wp:attachment":[{"href":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-json\/wp\/v2\/media?parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-json\/wp\/v2\/categories?post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bf0cd40f-7ebb-43c9-a4ea-50b260f6ecbb.express.conves.io\/wp-json\/wp\/v2\/tags?post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}