A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: php script to save user specs

  1. #1
    Senior Member fantasio's Avatar
    Join Date
    May 2000
    Location
    at the progress bar
    Posts
    409

    php script to save user specs

    hi,

    just for my plain interest, i would like to check the languages and Monitor resolutions that the people visiting my websites have.
    flash can do this, without problems, but i need a script to save the values (in conjunction with flash and/or my html page)

    any ideas ?

    thanks

  2. #2
    Senior Member Wancieho's Avatar
    Join Date
    May 2002
    Posts
    370
    You could do this using PHP. Do you have have PHP installed on your machine or are you gonna be uploading to a server that supports PHP? I can make up a PHP script that writes to a text file if you want.

  3. #3
    Senior Member fantasio's Avatar
    Join Date
    May 2000
    Location
    at the progress bar
    Posts
    409

    sounds good...

    I used php before to store data, and i used:
    <?
    $filename="news.txt";
    $fp = fopen($filename, "w+");
    fwrite($fp,"$newstext");
    fclose($fp)

    ?>
    so how do I not overwrite the variables but add a new one for every user?

    Also a per cent calculation would be cool.

    thanks

  4. #4
    Senior Member Wancieho's Avatar
    Join Date
    May 2002
    Posts
    370
    Try this:
    Code:
    $info="Your info to store";
    $filename="news.txt";
    $fp = fopen($filename, "a");
    $line = $info;
    fputs($fp, $line, $size);
    fclose($fp);
    For a count just make each users details appear on only 1 line then count the lines.
    Last edited by Wancieho; 10-16-2002 at 12:07 PM.

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