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
Join the weekly newsletter
Sign up for our newsletter. You'll be updated on new tutorials as they come available.
Subscribe today and get a 50% discount code to Paulund