Jump to content


Photo
- - - - -

Preventing "The Digg Effect"


  • Please log in to reply
4 replies to this topic

#1 Joablen

Joablen

    Young Padawan

  • Members
  • Pip
  • 40 posts
  • Location:Chile

Posted 16 September 2006 - 10:40 AM

The Digg Effect is what happens to your blog/site when you get dugg to first page, that's what Stephen says it is, Here

an easy solution would be something like this:

<?php
if (!strpos($_SERVER['HTTP_REFERER'], 'digg.com'))
{
	echo 'ADS CODE';
}
?>


but sometimes users that come from digg take a look at the rest of your site and keep not clicking on your ads so the code above wouldn't be useful and we would have to make something like this:

At the beggining of your code put this:
<?php
if (strpos($_SERVER['HTTP_REFERER'], 'digg.com'))
{
	$expire = 24 * 60 * 60; //One day
	setcookie('digg_user', true, $expire);
}
?>

and where your ads are put this:
<?php
if (!(isset($_COOKIE['digg_user']) && $_COOKIE['digg_user'] == true))
{
	echo 'ADS CODE';
}
?>

Edited by Joablen, 16 September 2006 - 11:02 AM.


#2 Donna

Donna

    Retired P2L Queen!

  • P2L Staff
  • PipPipPipPip
  • 12,330 posts
  • Gender:Female
  • Location:B.C Canada

Posted 16 September 2006 - 04:39 PM

;) you put this on digg

#3 Joablen

Joablen

    Young Padawan

  • Members
  • Pip
  • 40 posts
  • Location:Chile

Posted 16 September 2006 - 08:56 PM

yes... sry if theres any problem with that... i just wanted to give an answer for an other digg thing and i had no place to post it... so i thought maybe if the post goted some popularity why not give some more visits to pixel2life.com after all i've learned thats to you guys... :D

Edited by Joablen, 16 September 2006 - 08:56 PM.


#4 dEcade

dEcade

    P2L Staff

  • P2L Staff
  • PipPipPipPip
  • 1,850 posts
  • Gender:Male
  • Location:Saskatoon, Saskatchewan
  • Interests:Guitar, Programming, Storm Chasing, Games (Designing and playing), Hockey, Photography

Posted 17 September 2006 - 09:51 AM

It's just kind of weird adding a thing that’s bad about the site to the site. That’s like someone posting a link to an article about something bad about P2L on the P2L forums. Although we all know that would and could never happen :P

I also found the digg quite easily - http://digg.com/sear...e "Digg Effect"

dEcade

Edited by dEcade, 17 September 2006 - 09:51 AM.


#5 Joablen

Joablen

    Young Padawan

  • Members
  • Pip
  • 40 posts
  • Location:Chile

Posted 17 September 2006 - 09:52 AM

It's just kind of weird adding a thing that’s bad about the site to the site. That’s like someone posting a link to an article about something bad about P2L on the P2L forums. Although we all know that would and could never happen :P

I also found the digg quite easily - http://digg.com/sear...e "Digg Effect"

dEcade


thats true :D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users