Like us on Facebook

  Like

About the author

Ashish Prajapati

Hi there, My name is Ashish Prajapati. I'm currently doing my computer science degree. I love computers and programming a lot as I started this blog (Geekybits) just to learn and experience about wordpress sites.I spend my whole day sitting in front of my laptop what I just love. You can check out my professional skills and more about me on LinkedIn. And yeah thanks for visiting this blog.

Related Articles

5 Comments

  1. 1

    name

    Really appreciate you sharing this blog.Much thanks again. Much obliged.

    Reply
  2. 2

    Bisnis Online

    thanks so much brother your posting, i want to make a block from forum topic darodar, i dont know where is from the visitor

    Reply
  3. 3

    crorkz linkz

    I’ve recently started a blog, the info you provide on this site has helped me greatly. Thanks for all of your time and work.

    Reply
  4. 4

    Jeff

    So I figured out the reason that people were saying the PHP code wasn’t working. There’s actually a few reasons:

    A) It should be HTTP_REFERER, not HTTP_REFERRER – there’s two many “R’s” in the php code above.
    B) It throws an indexing error if you go directly to the link (which isn’t really an issue since this is coming from ‘referral’ spam which by it’s very nature should populate the HTTP_REFERER global variable). So speaking more from a user side than stopping spam, if you don’t make sure the HTTP_REFERER variable is set using something like “if (isset($SERVER[‘HTTP_REFERER’])”, PHP will throw an indexing error.
    C) As a side note, the php method itself is only semi successful in blocking referrer spam. The reason is the HTTP_REFERER variable itself can be manipulated by the end user. So any hacker worth their code could easily make this a randomly ‘referred’ site as a work around – which means you’d have to stay on top of your analytics to see where the referral spam is coming from.

    Reply
  5. 5

    Chris

    If you want to block the traffic from showing in your analytics then you need to stop the spam using .htaccess file. Putting the .php or java script into the header will not prevent this.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2014 Geekybits. All rights reserved.

Follow us

Facebook   Twitter   Google+