PDA

View Full Version : Counting Outs with customize out url?


znas
3rd February 2009, 11:17 PM
Hi master of the best trading Script ever :)

I Use 4.1.2 !
first of all, I can not install the software needed for CJOVERKILL 5 :(

And i take cjoverkill for a funsite.

I will often post links to articles of my partners.

What i mean...

In my Database, for example, the site , http://www.hopeman.de/ is stored!

Now, i will send him Traffic with a hardlink to http://www.hopeman.de/domino-mit-bierflaschen/

I tried it so -> out.php?=http://www.hopeman.de/domino-mit-bierflaschen/

But if i clicked on the Link, i get moved to a other Site from a random partner of the stored sites in my Database. No counting for hopeman.de.

Can you please help me? How i can make a working Link to http://www.hopeman.de/domino-mit-bierflaschen/ with working landing and working out counting?

Regrads
znas

ICEFIRE
4th February 2009, 12:28 AM
you have two options here:

out.php?url=http://www.hopeman.de/domino-mit-bierflaschen/

that will send all the clicks to the url, but with this option it will count only a click because the url parameter is intended to be used when sending to galleries, games, videos or something else.

out.php?trade=hopeman.de

This one will count one click to that trade and one out to it. It will send the hit to the url that you have set for that trade. You can change that url by hiting the edit button once you selet that trade.
the script will track ins from the entire domain that trade has, so you can put any url in that domain as return place. In this case it could be http://www.hopeman.de/domino-mit-bierflaschen/


Take a look at the manual page. There you have explained the out.php parameters. they are the same for version 4.x and 5.x, so you can use the examples pointed there.
http://www.cjoverkill.com/manual/installation.html#first-site

znas
4th February 2009, 12:50 AM
so i have no chance that with this link

out.php?url=http://www.hopeman.de/domino-mit-bierflaschen/

the tradepartner hopeman.de dont get one out in stats? :eek:

i send often direct links to partner with a articel i cant switch the trade url with edit...

you dont have a idea to realise it with cjoverkill ? :( that customize links with partner url in it get one out counted?

regrads

ICEFIRE
4th February 2009, 02:05 AM
Let me understand exactly what you want to do.

you have a trade with www.domain.com
you want to be able to send traffic to www.domain.com/something-here
you want it to get counted as outs

In this case, you just need to set the url for that trade to http://www.domain.com/something-here and use out.php?trade=domain.com

If you plan to use several links per domain then it's different stuff.
For example, if you want to have one link to www.domain.com/something and then another to www.domain.com/another-thing

The script was not intended to work in the 2nd way (multiple links) because then it manages them with the url parameter as if they were just galleries. Anyways, the modifications to be done in order to track them are not very complicated if you need that feature done.

znas
4th February 2009, 10:05 AM
Let me understand exactly what you want to do.

you have a trade with www.domain.com
you want to be able to send traffic to www.domain.com/something-here
you want it to get counted as outs

In this case, you just need to set the url for that trade to http://www.domain.com/something-here and use out.php?trade=domain.com

If you plan to use several links per domain then it's different stuff.
For example, if you want to have one link to www.domain.com/something and then another to www.domain.com/another-thing

The script was not intended to work in the 2nd way (multiple links) because then it manages them with the url parameter as if they were just galleries. Anyways, the modifications to be done in order to track them are not very complicated if you need that feature done.

Thanks !
But for me no chance to do develop that feature, can i pay you for that feature? :)

regrads

znas
4th February 2009, 10:15 AM
Before:
// Track of clicks to trades from the toplist
if ($_GET["trade"]!="") {
$trade=cjoverkill_sanityze($_GET["trade"]);
if (strlen($trade)>250){
$what="Trade value is too long. Possible SQL injection attempt";
@mysql_query("INSERT INTO cjoverkill_security (fecha,what,ip,proxy,hour)
VALUES (NOW(), '$what', '$ip', '$proxy', '$thishour')") OR
cjoverkill_db_error(mysql_error());
cjoverkill_disconnect();
cjoverkill_print_error("Your trade value appears to be too long<BR>
Are you trying to hack me duhdah?
");
}
$sql=@mysql_query("SELECT trade_id, url FROM cjoverkill_trades WHERE domain='$trade'") OR
cjoverkill_db_error(mysql_error());
$tmp=@mysql_fetch_array($sql);
if (@mysql_num_rows($sql)>0) {
extract($tmp);
@mysql_query("UPDATE cjoverkill_stats SET out$thishour=out$thishour+1 WHERE trade_id='$trade_id'") OR
cjoverkill_db_error(mysql_error());
$israw=0;
@mysql_query("UPDATE cjoverkill_iplog_out SET raw_out=raw_out+1 WHERE ip='$ip' AND proxy='$proxy' AND trade_id='$trade_id'") OR
cjoverkill_db_error(mysql_error());
if (@mysql_affected_rows()==0) {
$israw=0;
@mysql_query("INSERT INTO cjoverkill_iplog_out (trade_id, ip, proxy, raw_out, hour)
VALUES ($trade_id, '$ip', '$proxy', 1, '$thishour')") OR
cjoverkill_db_error(mysql_error());
}
else {
$israw=1;
}
@mysql_query("UPDATE cjoverkill_trades SET out_tot=out_tot+1 WHERE trade_id='$trade_id'") OR
cjoverkill_db_error(mysql_error());
if ($israw==1){
@mysql_query("UPDATE cjoverkill_country_log_out SET raws=raws+1 WHERE trade_id='$trade_id' AND c2code='$c2code'") OR
cjoverkill_db_error(mysql_error());
if (@mysql_affected_rows()==0) {
@mysql_query("INSERT INTO cjoverkill_country_log_out (trade_id, c2code, uniqs, raws)
VALUES ($trade_id, '$c2code', '1', '1')") OR
cjoverkill_db_error(mysql_error());
}
}
else {
@mysql_query("UPDATE cjoverkill_country_log_out SET raws=raws+1, uniqs=uniqs+1 WHERE
trade_id='$trade_id' AND c2code='$c2code'") OR
cjoverkill_db_error(mysql_error());
if (@mysql_affected_rows()==0) {
@mysql_query("INSERT INTO cjoverkill_country_log_out (trade_id, c2code, uniqs, raws)
VALUES ($trade_id, '$c2code', '1', '1')") OR
cjoverkill_db_error(mysql_error());
}
}
send_hit($url);
cjoverkill_disconnect();
exit;
}
}


AFTER:
// Track of clicks to trades from the toplist
if ($_GET["trade"]!="") {
$trade=cjoverkill_sanityze($_GET["trade"]);
if (strlen($trade)>250){
$what="Trade value is too long. Possible SQL injection attempt";
@mysql_query("INSERT INTO cjoverkill_security (fecha,what,ip,proxy,hour)
VALUES (NOW(), '$what', '$ip', '$proxy', '$thishour')") OR
cjoverkill_db_error(mysql_error());
cjoverkill_disconnect();
cjoverkill_print_error("Your trade value appears to be too long<BR>
Are you trying to hack me duhdah?
");
}
$sql=@mysql_query("SELECT trade_id, url FROM cjoverkill_trades WHERE domain='$trade'") OR
cjoverkill_db_error(mysql_error());
$tmp=@mysql_fetch_array($sql);
if (@mysql_num_rows($sql)>0) {
extract($tmp);
@mysql_query("UPDATE cjoverkill_stats SET out$thishour=out$thishour+1 WHERE trade_id='$trade_id'") OR
cjoverkill_db_error(mysql_error());
$israw=0;
@mysql_query("UPDATE cjoverkill_iplog_out SET raw_out=raw_out+1 WHERE ip='$ip' AND proxy='$proxy' AND trade_id='$trade_id'") OR
cjoverkill_db_error(mysql_error());
if (@mysql_affected_rows()==0) {
$israw=0;
@mysql_query("INSERT INTO cjoverkill_iplog_out (trade_id, ip, proxy, raw_out, hour)
VALUES ($trade_id, '$ip', '$proxy', 1, '$thishour')") OR
cjoverkill_db_error(mysql_error());
}
else {
$israw=1;
}
@mysql_query("UPDATE cjoverkill_trades SET out_tot=out_tot+1 WHERE trade_id='$trade_id'") OR
cjoverkill_db_error(mysql_error());
if ($israw==1){
@mysql_query("UPDATE cjoverkill_country_log_out SET raws=raws+1 WHERE trade_id='$trade_id' AND c2code='$c2code'") OR
cjoverkill_db_error(mysql_error());
if (@mysql_affected_rows()==0) {
@mysql_query("INSERT INTO cjoverkill_country_log_out (trade_id, c2code, uniqs, raws)
VALUES ($trade_id, '$c2code', '1', '1')") OR
cjoverkill_db_error(mysql_error());
}
}
else {
@mysql_query("UPDATE cjoverkill_country_log_out SET raws=raws+1, uniqs=uniqs+1 WHERE
trade_id='$trade_id' AND c2code='$c2code'") OR
cjoverkill_db_error(mysql_error());
if (@mysql_affected_rows()==0) {
@mysql_query("INSERT INTO cjoverkill_country_log_out (trade_id, c2code, uniqs, raws)
VALUES ($trade_id, '$c2code', '1', '1')") OR
cjoverkill_db_error(mysql_error());
}
}
if ($_GET["lol"]!="")
{
$lol=$_GET["lol"];
send_hit($lol);
}
else {
send_hit($url);
}
cjoverkill_disconnect();
exit;
}
}

Thats my idea?
out.php?trade=hopeman.de&lol=http://www.hopeman.de/domino-mit-bierflaschen/

all okay so?

if you know an easier way, please :) tell me!

ICEFIRE
4th February 2009, 11:00 AM
That will do the work exactly.

Perhaps you would prefer to make some sanity checks on the lol parameter. It will not hit any database queries, but it's a good idea to sanity check everything that the surfer gives to the script as parameter:


if ($_GET["lol"]!="")
{
$lol=cjoverkill_sanityze($_GET["lol"]);
send_hit($lol);
}
else {
send_hit($url);
}

znas
4th February 2009, 03:11 PM
if ($_GET["lol"]!="")
{
$lol=cjoverkill_sanityze($_GET["lol"]);
send_hit($lol);
}
else {
send_hit($url);
}

Thank you!

What exactly do sanityze? :)

ICEFIRE
4th February 2009, 06:00 PM
The sanityze function basically filters harmfull entries that may lead to a database level attack under different php configurations, so you don't need to care much if your server admin has configured php to parse quotes properly or not for example.