ICEFIRE Webmaster Board  

Go Back   ICEFIRE Webmaster Board > CjOverkill Support Forum > CjOverkill General Discussion and Support

CjOverkill General Discussion and Support CjOverkill general discussion and support.

Reply
 
Thread Tools Display Modes
  #1  
Old 3rd February 2009, 10:17 PM
znas znas is offline
Junior Member
 
Join Date: Feb 2009
Posts: 5
Default Counting Outs with customize out url?

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
Reply With Quote
  #2  
Old 3rd February 2009, 11:28 PM
ICEFIRE ICEFIRE is offline
Administrator
 
Join Date: Sep 2008
Location: Galaxy Media
Posts: 337
Send a message via ICQ to ICEFIRE
Default

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/ins...tml#first-site
Reply With Quote
  #3  
Old 3rd February 2009, 11:50 PM
znas znas is offline
Junior Member
 
Join Date: Feb 2009
Posts: 5
Default

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?

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
Reply With Quote
  #4  
Old 4th February 2009, 01:05 AM
ICEFIRE ICEFIRE is offline
Administrator
 
Join Date: Sep 2008
Location: Galaxy Media
Posts: 337
Send a message via ICQ to ICEFIRE
Default

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.
Reply With Quote
  #5  
Old 4th February 2009, 09:05 AM
znas znas is offline
Junior Member
 
Join Date: Feb 2009
Posts: 5
Default

Quote:
Originally Posted by ICEFIRE View Post
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
Reply With Quote
  #6  
Old 4th February 2009, 09:15 AM
znas znas is offline
Junior Member
 
Join Date: Feb 2009
Posts: 5
Default

Before:
Code:
// 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:
Code:
// 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!

Last edited by znas; 4th February 2009 at 09:30 AM.
Reply With Quote
  #7  
Old 4th February 2009, 10:00 AM
ICEFIRE ICEFIRE is offline
Administrator
 
Join Date: Sep 2008
Location: Galaxy Media
Posts: 337
Send a message via ICQ to ICEFIRE
Default

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:

PHP Code:
if ($_GET["lol"]!="")  
    {    
        
$lol=cjoverkill_sanityze($_GET["lol"]);
        
send_hit($lol);
    }
    else {
        
send_hit($url);
    } 
Reply With Quote
  #8  
Old 4th February 2009, 02:11 PM
znas znas is offline
Junior Member
 
Join Date: Feb 2009
Posts: 5
Default

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

Thank you!

What exactly do sanityze?
Reply With Quote
  #9  
Old 4th February 2009, 05:00 PM
ICEFIRE ICEFIRE is offline
Administrator
 
Join Date: Sep 2008
Location: Galaxy Media
Posts: 337
Send a message via ICQ to ICEFIRE
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:31 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.