Traffic rules - outgoing custom?

blogger365
Posts: 60
Joined: Wed Feb 20, 2013 6:27 pm

Traffic rules - outgoing custom?

Post 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
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Traffic rules - outgoing custom?

Post by admin »

Don't forget to run script update
blogger365
Posts: 60
Joined: Wed Feb 20, 2013 6:27 pm

Re: Traffic rules - outgoing custom?

Post 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!

admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Traffic rules - outgoing custom?

Post 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']))
Don't forget to run script update
blogger365
Posts: 60
Joined: Wed Feb 20, 2013 6:27 pm

Re: Traffic rules - outgoing custom?

Post 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']))
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Traffic rules - outgoing custom?

Post by admin »

Well, you can do this way too
Don't forget to run script update
blogger365
Posts: 60
Joined: Wed Feb 20, 2013 6:27 pm

Re: Traffic rules - outgoing custom?

Post 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!
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Traffic rules - outgoing custom?

Post by admin »

May be $myurl was empty or something
but yes, you can redirect there
Don't forget to run script update
blogger365
Posts: 60
Joined: Wed Feb 20, 2013 6:27 pm

Re: Traffic rules - outgoing custom?

Post 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...
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Traffic rules - outgoing custom?

Post 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
Don't forget to run script update
Post Reply