Page 1 of 2
Traffic rules - outgoing custom?
Posted: Tue Mar 25, 2014 7:05 pm
by blogger365
Hello!
I'd like to ask - is there an option to make something like this:
Traffic Rules - Outgoing
var = HTTP_REFERER
value = yourdomain.com
click = 3
Redirect URL =
http://sponsor.com/
Redirecting each 3rd click to sponsor.
But to add some other conditions - like time, day, etc?
Is file common.php used with outgoing clicks as well?
So I can add in common.php something like this:
if ($click=3 AND time>2 AND day>2) redirect to url
else
->
continue outgoing as normal <-
My question is how exactly I should do if condition is not met, to continue outgoing as normal (not redirect?
Thanks a lot!
P.S I read your example here:
viewtopic.php?f=2&t=89480&start=10#p126928
Re: Traffic rules - outgoing custom?
Posted: Tue Mar 25, 2014 7:06 pm
by admin
Re: Traffic rules - outgoing custom?
Posted: Wed Mar 26, 2014 6:36 am
by blogger365
Hello,
Thank you for suggestion, but is there an option there to sell only 3rd click from specific time interval only?
I just wanted to know if there is possibility to use common.php or include out.php to achieve this:
if ($click=3 AND time>2 AND day>2) redirect to url
else
->continue outgoing as normal <-
Is that correct to get current click number: _$GET["Current-Click"]; ?
Thank you!
Re: Traffic rules - outgoing custom?
Posted: Wed Mar 26, 2014 12:11 pm
by admin
Well, actually it's a way to do it too
Set sell = 100%
and in common
if ($click=3 AND time>2 AND day>2) {
$_GET['skip_sell'] = true;
}
where date and time are pretty clear
and click is count(explode('|', $_COOKIE['to']))
Re: Traffic rules - outgoing custom?
Posted: Wed Mar 26, 2014 6:52 pm
by blogger365
Thank you!
But since I want to redirect 3rd click, shouldn't it be like this:
if ($click=3 AND time>2 AND day>2) {
redirect to my url
}
else {
$_GET['skip_sell'] = true;
}
?
admin wrote:Well, actually it's a way to do it too
Set sell = 100%
and in common
if ($click=3 AND time>2 AND day>2) {
$_GET['skip_sell'] = true;
}
where date and time are pretty clear
and click is count(explode('|', $_COOKIE['to']))
Re: Traffic rules - outgoing custom?
Posted: Wed Mar 26, 2014 8:02 pm
by admin
Well, you can do this way too
Re: Traffic rules - outgoing custom?
Posted: Thu Mar 27, 2014 8:26 am
by blogger365
admin wrote:Well, you can do this way too
Thanks!
Really appreciate your support.
I'd like to ask as well - is it possible to use Header("Location: $url"); in common.php?
I tried to set cookie in common.php and then to redirect like:
setcookie("cookie","",time()+86400,'/');
Header("Location: $myurl");
But it doesn't work - no cookie was set, no redirect...
I removed set cookie, still header redirect doesn't work...
Thanks!
Re: Traffic rules - outgoing custom?
Posted: Thu Mar 27, 2014 11:58 am
by admin
May be $myurl was empty or something
but yes, you can redirect there
Re: Traffic rules - outgoing custom?
Posted: Thu Mar 27, 2014 1:40 pm
by blogger365
admin wrote:May be $myurl was empty or something
but yes, you can redirect there
It's very weird:
I put this on the top in common.php:
<?
$numclicks=count(explode('|', $_COOKIE['to']));
if ($numclicks=="3") {Header("Location:
http://google.com");exit();}
..
?>
But it doesn't work, I checked $numclicks got value.
In short - if I put Header location on the very top - it works, if I put it somewhere else - it doesn't...
Re: Traffic rules - outgoing custom?
Posted: Thu Mar 27, 2014 1:43 pm
by admin
You have to do more dubugging of your code
Try to replace your code with
header("Location:
http://google.com");
exit();
and you'll see rediect