A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Detect number of copies opened on a network

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    272

    Detect number of copies opened on a network

    Greetings all,

    I am wondering if there is anyway to detect the number of times a file is open.

    This is to control the number of instances of a program being used at once in a server environment.

    I would like to limit the number of opened instances of my program to 20.

    Can SWFStudio or MDMZinc do this?

    Thanks in advance.

    Cheers!

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Can you have a PHP application (or other server side app) running on the server? If so you could communicate with that application and use it to limit the number of active users. If that's not possible then there are some other "hackish" ways you could do what you want. One is to create control files with unique names like "control.1", "control.2", etc up to "control.20" and if the application is about to create control.21 then you would not let it run. This assumes you can check for file existence (SWF Studio can). To avoid leaving files around after an app quits you would periodically write data to the control files to update the time stamp while the app is running. This allows you to reuse control files. It's a bit more complicated than counting the number of users who have opened a file but you can do it today with a tool like SWF Studio.

  3. #3
    Senior Member
    Join Date
    Sep 2000
    Posts
    272

    Thanks for the suggestions

    I shall give it a go and post back the outcome.


    Thanks for your guidance Northcode, it is always appreciated.

    Cheers!

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