Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2009
    New York
    Thanked 0 Times in 0 Posts

    Question Recording user information in a seperate file.

    I have some code that currently (probably not that acuratly) detects someones bandwidth before playing a video, currently I have it so it writes out that information to the user, how can I write this information to a separate .txt document or something similar?

     // this method is called when the bandwidth check is done 
    onBwDone: function(url, chosenBitrate, bitrate) { 
         var el = document.getElementById("info"); 
          el.innerHTML = "Your speed is: " +bitrate+ "<br />Video file served: " +url;

  • #2
    Senior Coder
    Join Date
    Oct 2008
    Long Beach
    Thanked 164 Times in 164 Posts
    If your purpose is to record user information for your own data records then the easiest/most secure method would be to use a server-side language in conjunction with a database (ASP/PHP/JSP and MySQL for example). You can also write to text files as well though that's a bit sloppier.

    If your purpose is to remember the user throughout their experience on your website (so you don't have to keep checking) then cookies are your best bet. These can be set with Javascript only, which means you don't have to meddle with server-side code.

    Let me know what you want and I can help you with the specific code.
    Feel free to e-mail me if I forget to respond ;)


    Posting Permissions

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