Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Cat
    Cat is offline
    Junior Member Cat's Avatar
    Join Date
    Jul 2006
    Location
    Finland
    Posts
    20
    Member #
    13537
    Hello everyone! I wonder if anyone here is familiar with Fast Click. I download it from http://www.ftrsoft.com , installed and everything worked great, but when I added a link to my site (ex. <a href="fclick.php?id=01">Link</a>) and clicked download I got an Internal Server Error. Does anyone know how to fix this? Or why do I get this error?
    Thank you!

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Something's wrong with your script, fclick.php

    Turn off "pretty error messages" in your options panel and it will give you a more descriptive message. Do that, and post the script here in [php] blocks so we can decipher the problem.

  4. #3
    Cat
    Cat is offline
    Junior Member Cat's Avatar
    Join Date
    Jul 2006
    Location
    Finland
    Posts
    20
    Member #
    13537
    I'm sorry, where can I find Options panel? :surprised: And here's my fclick.php file:

    PHP Code:
    <?php
    // ----------------------------------------------------------------------
    // Fast Click SQL - Advanced Clicks Counter System
    // Copyright (c) 2003-2006 by Dmitry Ignatyev (ftrainsoft@mail.ru)
    // http://www.FTRSoft.com/
    // ----------------------------------------------------------------------
    // Original Author of file: Dmitry Ignatyev
    // ----------------------------------------------------------------------

    @ignore_user_abort(true);
    @
    Error_Reporting(E_ALL & ~E_NOTICE);

    $CFG['USER'] = 1;
    $CFG['CDIR'] = "./common";
    require(
    $CFG['CDIR']."/error.php");
    require(
    $CFG['CDIR']."/init.php");

    // Initialization
    InitVars();
    if(
    $ERR['flag']) {
      
    err('fclick.php||initialization was failed');
      
    log_out();
      die(
    'Initialization was failed. Communicate with Administrator.');
     }

    //------------------
    // Get Link from DB
    //------------------
    if(isset($_GET["id"])) $lid $_GET["id"];
    else if(isset(
    $_GET["fid"])) $lid $_GET["fid"];
    else 
    $lid $_SERVER["QUERY_STRING"];

    if(!
    $lid) {
      
    err('fclick.php||Link ID not specified.<br>'.
          
    'Referer: '.$_SERVER["HTTP_REFERRER"].'<br>Request: '.$_SERVER["REQUEST_URI"]);
      
    log_out();
      die(
    'Link ID not specified. Communicate with Administrator.');
     }

    $sth $DB->query("SELECT * FROM ".$PREFIX."links WHERE Link = '".addslashes($lid)."'");
    if(!
    $sth) {
      
    err('fclick.php||get link from database was failed -- '.$DB->error().
          
    '<br>Referer: '.$_SERVER["HTTP_REFERRER"].'<br>Request: '.$_SERVER["REQUEST_URI"]);
      
    log_out();
      die(
    'Can\'t get link. Communicate with Administrator.');
     }

    if(!
    $sth->rows()) {
      
    err('fclick.php||Unknow link ID: '.$lid.
          
    '<br>Referer: '.$_SERVER["HTTP_REFERRER"].'<br>Request: '.$_SERVER["REQUEST_URI"]);
      
    log_out();
      die(
    'Unknow link ID: '.$lid.'. Communicate with Administrator.');
     }

    $link $sth->fetchrow_array();

    $ip sprintf("%u"ip2long($_SERVER['REMOTE_ADDR']));  // Get IP address

    // Get information about visitor
    $visitor['IP'] = $ip;
    $visitor['SDate'] = $CFG['CTIME'];
    $visitor['EDate'] = $CFG['CTIME'];
    $visitor['Count'] = 1;

    // Get Visitor (check if exists)
    $sth $DB->query("SELECT * FROM ".$PREFIX."visitors WHERE IP = ".$ip." AND EDate > ".($CFG['CTIME'] - 1800));
    if(!
    $sth) {
      
    err('fclick.php||get visitor from database was failed -- '.$DB->error());
      
    log_out();
      
    Header("Location: ".$link[4]);
      exit;
     }

    if(!
    $sth->rows()) {
      if(!
    $DB->insert($PREFIX."visitors"$visitor)) {
        
    err('fclick.php||can\'t add visitor to database -- '.$DB->error());
        
    log_out();
        
    Header("Location: ".$link[4]);
        exit;
       }

      
    $sth $DB->query("SELECT LAST_INSERT_ID() FROM ".$PREFIX."visitors");
      if(!
    $sth) {
        
    err('fclick.php||can\'t get last visitor ID from database -- '.$DB->error());
        
    log_out();
        
    Header("Location: ".$link[4]);
        exit;
       }

      
    $visid $sth->fetchrow_one();
     }
    else {       
    // Update Visitor EDate
      
    $visid $sth->fetchrow_one();
      
    $sth $DB->query("UPDATE ".$PREFIX."visitors SET Count=Count+1, EDate=".$CFG['CTIME']." WHERE VID = ".$visid);
      if(!
    $sth) {
        
    err('fclick.php||can\'t update visitor -- '.$DB->error());
        
    log_out();
        
    Header("Location: ".$link[4]);
        exit;
       }
     }

    $click['LID'] = $link[0];
    $click['CID'] = $link[2];
    $click['VID'] = $visid;
    $click['l_date'] = $CFG['CTIME'];

    if(!
    $DB->insert($PREFIX."stats"$click)) {
      
    err('fclick.php||can\'t add statistic to database -- '.$DB->error());
      
    log_out();
      
    Header("Location: ".$link[4]);
      exit;
     }
     
    // Update Link Count
    if(!$DB->query("UPDATE ".$PREFIX."links SET Count=Count+1 WHERE LID = ".$link[0])) {
      
    err('fclick.php||can\'t update link count -- '.$DB->error());
      
    log_out();
      
    Header("Location: ".$link[4]);
      exit;
     }

    // Delete OLD STATS
    $sth $DB->query("DELETE FROM ".$PREFIX."stats WHERE l_date < ".($CFG['CTIME'] - $CFG['SAVESTAT'] * 86400));
    if(!
    $sth) {
      
    err('fclick.php||can\'t delete old stats -- '.$DB->error());
      
    log_out();
      
    Header("Location: ".$link[4]);
      exit;
     }

    $sth $DB->query("DELETE FROM ".$PREFIX."visitors WHERE EDate < ".($CFG['CTIME'] - $CFG['SAVESTAT'] * 86400));
    if(!
    $sth) {
      
    err('fclick.php||can\'t delete old visitors -- '.$DB->error());
      
    log_out();
     }

    Header("Location: ".$link[4]);
    exit;

    ?>

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Your browser options. In IE it's Tools->Internet Options, then click the Advanced tab and uncheck "Show friendly HTTP error messages."

  6. #5
    Cat
    Cat is offline
    Junior Member Cat's Avatar
    Join Date
    Jul 2006
    Location
    Finland
    Posts
    20
    Member #
    13537
    Thanks for helping me! I just reinstalled everything and it works! I think i did something wrong before. Anyway, thanks for all your help!

  7. #6
    Cat
    Cat is offline
    Junior Member Cat's Avatar
    Join Date
    Jul 2006
    Location
    Finland
    Posts
    20
    Member #
    13537
    Sorry for double-posting, but I have a question. I'm using a javascript to show the numbers of downloads:

    HTML Code:
    <script type="text/javascript" src="fclick/show.php?js&id=ID"></script>
    but when i use it, my page loads very slowly. There's a SSI script too:

    <!--#include virtual="fclick/show.php?ID"-->

    but it won't appear on my page. I wonder if there's a way to show the number of downloads in PHP?
    Thanks!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

fastclick ftrsoft

Click on a term to search for related topics.
All times are GMT -6. The time now is 04:36 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com