Display Message To Stumbleupon Visitors In PHP
Stumbleupon is a great way of getting lots of visitors to your site. All you have to do is submit your pages to Stumbleupon and when people stumble in their chosen topic they will find your page. The more votes your pages get the more likely they are going to be seen.
If all you need is more people to vote for your pages then why not ask people to vote for your pages?
All you have to do is add the following snippet to your page and you can display a custom message to Stumbleupon users asking for them to vote for your page.
<?php if( strpos($_SERVER[HTTP_REFERER], "stumbleupon.com" ) == true ): ?> <div class="welcome-stumbleupon"> <p>Hello StumbleUpon user, please vote for this page by clicking the thumbs up picture in the toolbar.</p> </div> <?php endif; ?>
Learn how to code with Treehouse
- Learn projects with access to 1000+ videos
- Practice live with our Code Challenge Engine
- Get help in our members-only forums
- Access 100s of premium tutorials and downloadable content
- Members content consists of premium WordPress plugins
- CSS packages, jQuery packages, tutorial demo files and templates for 100s of web development tutorials
- In-depth development tutorials
- Priority tutorial requests
- No ads