A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Counting clicks (php/3dfa)

  1. #1
    Member
    Join Date
    Nov 2001
    Posts
    49

    Counting clicks (php/3dfa)

    Hi all,

    I found me a nice banner program that accepts flash banners but I'm having an interesting problem, in that the program will count impressions but not click-throughs.

    anyone know of a way to get 3dfa, to pass click counts to a simple flat file or mysql db??

    I can do the server side coding, jus need help with the flash end.

    NOTE, the destination url is embedded in the flash movie, itself.

    thanks in advance for any ideas.

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    loadvars

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    You could probably use the same method I used to create a 3dfa flash counter. The counter counts hits but not visits. If you reload it will add another digit.

    Here is what I did.

    First, create an EDIT box with the variable 'newcount'

    Then create a starting script:
    Code:
    loadVariables("counter.php","GET");
    Now you need to create the php
    PHP Code:
    <?php
    // This file will open or create a text file page_counter.txt
    // Then it will open it, update the info and post 
    $counterval 0;
    $fp fopen"./page_counter.txt","r");
    $counterval fread($fp26 );
    fclose$fp );
    $counterval = (integer)$counterval 1;
    $fp fopen"./page_counter.txt","w+");
    fwrite$fp$counterval26);
    fclose$fp );
    echo 
    "&newcount=$counterval";
    ?>
    There you go. This will count hits for you.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center