doupingtang9627
doupingtang9627
2009-01-16 12:43
浏览 24
已采纳

跟踪用户推荐(PHP / MySQL)

Greetings,

Is there any script that keep track users referral and set cookie on users referred so whenever they leave site and come back, it still will be count as referred by person..

thanks.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • duanmiexi2275
    duanmiexi2275 2009-01-16 12:51
    已采纳
    //To set the cookie
    if($refered)
     {
        setcookie('sitenameReferal', 'REFERER');
     }
    //To retrieve it
    if($_COOKIE['sitenameReferal'])
     {
        $referedBy = $_COOKIE['sitenameReferal'];
     }
    

    It's simple enough.

    点赞 评论

相关推荐