|
|
|
how it work?
first the counter run us usual, using a php script, i use my old simple text counter with litle
modification.
We got two php script to make this possible, one counting other showing, you can put it on
one file even on spreaded files.
Below this is the script that have function to add out counter;
<?
if (!$phpcounter) {
//set cookies, so our counter isnt growing, at last 1 hour
setcookie("phpcounter",lock,time()+3600);
//open out flat data counter
$file = fopen("/location/of/our/flat/data/count.txt","r+");
//read it
$count = fread($file, filesize("/location/of/our/flat/data/count.txt"));
//close the file
fclose($file);
//set variable to add 1
$count +=1;
//open again to add 1
$file = fopen("/location/of/our/flat/data/count.txt","w+");
fputs($file, $count);
fclose($file); }
?>
now we going to script that have function to show our counter let name it flacounter.php3
<?
$filename = "/home/idban/count.txt";
//open out flat data counter
$fd = fopen ($filename, "r");
//read it
$counter = fread ($fd, filesize ($filename));
//close the file
fclose ($fd);
//set variable to flacounter
$flacounter = "counter=";
//set variable flacounter as rawdata
$flacounter .= rawurlencode($counter);
//print it, you will got counter=number..
echo "$flacounter";
?>
After making that scripts, now stating to make the fla file
A. select your text, then...right klik
B. select properties
then make sure you name your text property same as variable that you had chosse on your script, we
use counter= ; so .. we name it counter
now go to action/frame, pointing to your text ( counter ) layer, as you know out layer named
guestnum, so we pick the guestnum, next step, just right klik on it
and select properties
A. select action,
B. push + simbol, ( C ) select Load Variable, fill with location of your script that showing the
counter, mine is http://php.klik.or.id/fla/flaconter.php3 so, put it on the URL ( E )
D. push + simbol, once again and add play
F. change variable to GET
Credits:
- Rasmus, Julie, Desy fatmawati,
Jakarta, 21 Agustus 2000, copyleft by idban secandri <idban@nospam.satunet.com>
sample and complete documentation available on http://php.klik.or.id/fla
|
|
| Database Independent User Maintenance Categories : PHP, Flash | | | Classic guest book made with PHP and Flash Categories : PHP, Flash, Java Script | | | Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP, PHP, HTML, PDF, Excel | | | PHP Script to find url links in a page Categories : PHP, URLs, Regexps, Arrays | | | Using $PHP_AUTH_USER and $PHP_AUTH_PW to authenticate. Categories : Authentication, PHP | | | very simple ftp class Categories : PHP, PHP Classes, FTP | | | PHP Paypal IPN Integration Class v1.0.0 Categories : PHP, PHP Classes, Payment Gateways | | | Function to remember password Categories : PHP, Authentication, Personalization and Membership | | | Create Thumbnails - resize an image - jpeg, jpg, gif, png to the specifed width and height in proportion without loosing out on pixcel quality. Categories : PHP, GD image library, Graphics | | | recode -- Recode a string according to a recode request Categories : PHP, PHP Functions, Recode | | | a function that builds an HTML select list from any mysql table. Categories : PHP, MySQL, HTML and PHP | | | Math operations on big numbers Categories : PHP, Math. | | | phpAds, a complete banner and ad management system with detailled tracking and stats. Categories : MySQL, Complete Programs, Ecommerce, PHP, Databases | | | Point and Click Interface ala MS Access for creating SQL statements. Categories : MySQL, Complete Programs, General SQL, PHP, Databases | | | Tag content retrieval from websites with preg_match Categories : PHP, Regexps, Arrays, HTML and PHP | |
| | | | idban secandri wrote :450
http://php.klik.or.id cant resolve
u can use
http://klik.php.or.id/
http://phpklik.org/
http://php.linux.web.id/
| |
|
|
|