Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i need your helps in here
10-14-2013, 11:24 AM,
Post: #1
i need your helps in here
please am thinking of creating a referal script, dat would have a link like dis http://mysite.tld/ref?id=user, wen a user refers sum1 it adds a specified amount of coin to d user coin and only a click per ip, please how do i go about this?
Reply
[-] The following 1 user Likes lisnow's post:
  • mrbeen
10-14-2013, 05:33 PM,
Post: #2
RE: i need your helps in here
(10-14-2013, 11:24 AM)lisnow Wrote: please am thinking of creating a referal script, dat would have a link like dis http://mysite.tld/ref?id=user, wen a user refers sum1 it adds a specified amount of coin to d user coin and only a click per ip, please how do i go about this?

ref is signup page or redirecting page?

if you are using redirect method then use session

ref.php
PHP Code:
<?php
session_start
();
$_SESSION[ref]=$_GET[id];
header("Location: /reg.php");


then in your reg.php

PHP Code:
<?php
session_start
();
$ref_id=$_SESSION[ref];
$ip=$_SERVER[REMOTE_ADDR]; 
if u dont have email/account validation
then simply run this in reg.php itself

check the user ip

PHP Code:
$check=mysql_fetch_assoc(mysql_query("SELECT * from users where regip='$ip' "));
if(!
$check//no user signup with this ip so credit the coin
{
mysql_query("UPDATE users set coins=coins+10 WHERE userid='$ref_id'");

http://wapmaster.org Wap Master Organisation
http://mobtop.in Best toplist
Reply
10-19-2013, 09:24 AM, (This post was last modified: 10-19-2013, 09:25 AM by lisnow.)
Post: #3
RE: i need your helps in here
thanks very much.

but am still finding it difficult creating a random referal link.
Reply
10-19-2013, 09:27 AM,
Post: #4
RE: i need your helps in here
what do u mean by random referal link ?

use username(varchar) or userid (integer) in the affiliate link
http://wapmaster.org Wap Master Organisation
http://mobtop.in Best toplist
Reply
10-19-2013, 08:14 PM,
Post: #5
RE: i need your helps in here
i mean creating a refferal link http://mysite.tld?ref=12345 hw do i do dat please.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)