-
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.
-
KoolMoves Moderator
-
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($fp, 26 );
fclose( $fp );
$counterval = (integer)$counterval + 1;
$fp = fopen( "./page_counter.txt","w+");
fwrite( $fp, $counterval, 26);
fclose( $fp );
echo "&newcount=$counterval";
?>
There you go. This will count hits for you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|