Toh com um script q conta os cliques em links, mas consigui instala ele tudo, so q na hora em q clico no link, ele redireciona pra pagina certa so q ele acusa isso!!
Warning: fopen(referer.log): failed to open stream: Permission denied in /home/portal/public_html/fclick/fclick.php on line 87
Warning: fwrite(): supplied argument is not a valid stream resource in /home/portal/public_html/fclick/fclick.php on line 88
Warning: fclose(): supplied argument is not a valid stream resource in /home/portal/public_html/fclick/fclick.php on line 89
Warning: Cannot modify header information - headers already sent by (output started at /home/portal/public_html/fclick/fclick.php:87) in /home/portal/public_html/fclick/fclick.php on line 133
achuq deve ter alguma coisa errada no codigo, vo colocar o codigo aki, se alguém puder olhar e me ajudar agradeço!!!!
<?php
// ----------------------------------------------------------------------
// Fast Click - Clicks Counter System
// Copyright (c) 2001-2003 by Dmitry Ignatyev (ftrain@mail.ru)
// http://www.ftrain.hotbox.ru/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: Dmitry Ignatyev
// ----------------------------------------------------------------------
include("cfg.php");
function day_count($group=0) {
global $dayfile, $fid;
$today=(int)(time()/86400);
$f2 = fopen($dayfile, "r");
flock($f2, 2); // File Lock
$daylog=@file($dayfile); $cnt=sizeof($daylog);
for($i=0;$i<$cnt;$i++) {
list($day,$gr,$id,$count)=explode("|", $daylog[$i]);
if($today - $day > 7) $daylog[$i] = "";
else if(($day == $today) && ($fid == $id)) {
$found=1;
$count++;
$daylog[$i]=$day."|".$gr."|".$id."|".$count."|\n";
}
else {
$daylog[$i]=$day."|".$gr."|".$id."|".$count."|\n";
}
}
if(!$found) {
$daylog[$cnt] = $today."|".$group."|".$fid."|1|\n";
$cnt++;
}
$f=fopen($dayfile, "w");
for($i=0;$i<$cnt;$i++) fwrite($f, $daylog[$i]);
fclose($f);
flock($f2, 3); // File UnLock
fclose($f2);
}
function referrer_log($group=0) {
global $reffile, $fid;
$today=(int)(time()/86400);
if($_SERVER[HTTP_REFERER]) $newurl = addslashes($_SERVER[HTTP_REFERER]);
$newurl = urldecode($newurl);
$f2 = fopen($reffile, "r");
flock($f2, 2); // File Lock
$reflog=@file($reffile); $cnt=sizeof($reflog);
for($i=0;$i<$cnt;$i++) {
list($day,$gr,$id,$refurl,$count)=explode("|", $reflog[$i]);
if($today - $day > 7) $reflog[$i] = "";
else if(($day == $today) && ($fid == $id) && ($refurl == $newurl) ) {
$found=1;
$count++;
$reflog[$i]=$day."|".$gr."|".$id."|".$refurl."|".$count."|\n";
}
else {
$reflog[$i]=$day."|".$gr."|".$id."|".$refurl."|".$count."|\n";
}
}
if(!$found) {
$reflog[$cnt] = $today."|".$group."|".$fid."|".$newurl."|1|\n";
$cnt++;
}
$f=fopen($reffile, "w");
for($i=0;$i<$cnt;$i++) fwrite($f, $reflog[$i]);
fclose($f);
flock($f2, 3); // File UnLock
fclose($f2);
}
if(isset($HTTP_GET_VARS["ad"])) $fid = $HTTP_GET_VARS["ad"];
else if(isset($HTTP_GET_VARS["fid"])) $fid = $HTTP_GET_VARS["fid"];
if(!isset($fid)) exit;
$found = 0;
$f2 = fopen($datafile, "r");
flock($f2, 2); // File Lock
$base = @file($datafile); $cnt=sizeof($base);
for($i=1;$i<$cnt;$i++) {
list($gr,$id,$count,$url,$name)=explode("|", $base[$i]);
if($id==$fid) {
$found = 1;
$sent_url = $url;
$count++;
$base[$i]=$gr."|".$id."|".$count."|".$url."|".$name."|\n";
$base[0]=time()."\n";
$savegr = $gr;
}
else {
$base[$i]=$gr."|".$id."|".$count."|".$url."|".$name."|\n";
}
}
if($found) {
$f = fopen($datafile, "w");
for($i=0;$i<$cnt;$i++) fwrite($f, $base[$i]);
fclose($f);
}
flock($f2, 3); // File UnLock
fclose($f2);
if($found) {
day_count($savegr);
if($referring==1) referrer_log($savegr);
Header("Location: ".$sent_url); exit;
}
?>
Fiz tudo como pede no manual, não sei o q tah errado!?!?
Se alguém tiver um script bom de contagem de cliques, e quiser me mandar aceito!!
Pergunta
faustu
Toh com um script q conta os cliques em links, mas consigui instala ele tudo, so q na hora em q clico no link, ele redireciona pra pagina certa so q ele acusa isso!!
Warning: fopen(referer.log): failed to open stream: Permission denied in /home/portal/public_html/fclick/fclick.php on line 87
Warning: fwrite(): supplied argument is not a valid stream resource in /home/portal/public_html/fclick/fclick.php on line 88
Warning: fclose(): supplied argument is not a valid stream resource in /home/portal/public_html/fclick/fclick.php on line 89
Warning: Cannot modify header information - headers already sent by (output started at /home/portal/public_html/fclick/fclick.php:87) in /home/portal/public_html/fclick/fclick.php on line 133
achuq deve ter alguma coisa errada no codigo, vo colocar o codigo aki, se alguém puder olhar e me ajudar agradeço!!!!
Fiz tudo como pede no manual, não sei o q tah errado!?!?
Se alguém tiver um script bom de contagem de cliques, e quiser me mandar aceito!!
Link para o comentário
Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.