SearchSearch   ProfileProfile   Log inLog in   RegisterRegister 

Use firstspot as Usage based instead of time based

 
Post new topic   Reply to topic    FirstSpot Forum Index -> Pre-sales Support Forum
View previous topic :: View next topic  
Author Message
ruurd



Joined: 27 Oct 2007
Posts: 5

PostPosted: Sat Oct 27, 2007 3:25 pm    
Post subject: Use firstspot as Usage based instead of time based

Is there a way to use firstspot to terminate sessions based on usage (data transfer) instead of time based? If there is, how to display MB or $ remaining in the info window instead of time remaining? Does this requires periodic queries from the database through the auto refresh info window the remaining $ or MB and disconnect the user when 0 MB or $ remaining?
_________________
How to use firstspot for usage based (data transferred) instead of time based and display on info window the remaining $ or MB instead of remaining time?
Back to top
alan
Forum facilitator


Joined: 26 Sep 2003
Posts: 4435

PostPosted: Mon Oct 29, 2007 4:26 am    
Post subject:

You can take advantage of the "Data Transfer Quota" feature. Once you have this user attribute setup, FirstSpot will automatically disconnect the client when the quota is exhausted. Also, InfoBox will show the quota (MB) remaining.
_________________
~ Patronsoft Limited ~
Back to top
ruurd



Joined: 27 Oct 2007
Posts: 5

PostPosted: Tue Nov 06, 2007 8:25 pm    
Post subject: Setting up Data transfer quota

Hello Allan,
Thanks for the reply. I have a few questions for you.
In version 5, in the Configuration Manager,under "Users" category, at "UPLOAD/DOWNLOAD Enable data transfer counter" fields, what is the difference between option "Yes" and "Yes and disable the account when the counter exceeds the below quota (K Bytes): "? Do they both dissconnect the user when MB remaining is 0? The latter option is ok but I dont want the account to be disabled when there is no remaining MB because I want the user to refill the account again when needed. We have 2 databases, one holds the prepaid cards and the other for WIFI authentication and accounting. When a customer buys a card, he/she will use our recharge website listed in "Exception Free Website" at the web portal to transfer either the full or partial amount of the card from the prepaid card database to the WIFI (charging the account) before he/she can access the Internet. This is where I need the account not to be disabled because the customer can go back and recharge the account until the card balance in the prepaid card database run out.
At our "recharge website", which database field(s) names that amount of MB will be inserted? My php script should know where to post the MB when customer recharge the account.
I would appreciate your help on the above questions.

Thanks in advance,
ruurd.
_________________
How to use firstspot for usage based (data transferred) instead of time based and display on info window the remaining $ or MB instead of remaining time?
Back to top
alan
Forum facilitator


Joined: 26 Sep 2003
Posts: 4435

PostPosted: Wed Nov 07, 2007 4:28 am    
Post subject:

For "yes", FirstSpot only does data transfer tracking (reporting). It wouldn't disconnect any users.

For "Yes and disable the account when the counter exceeds the below quota (K Bytes)", FirstSpot will disconnect the user when the current data transfer reaches the quota value.

For user attributes definition, please refer to chapter 5 of firstspot_guide.pdf for the fsusr table definition.
_________________
~ Patronsoft Limited ~
Back to top
ruurd



Joined: 27 Oct 2007
Posts: 5

PostPosted: Thu Nov 08, 2007 12:35 pm    
Post subject:

Hello Alan,

Thanks for the your response. I am half way in writing my php script that does the refresh on user wifi accounts. I encountered on problem that I need your help. For each user account, when using Data Transfer Quotas, an amount of KBs have to be entered for each field (Download and Upload Quota). If a user does a wifi refresh through my php script, say put $5 into his/her account, this amount will be converted into KBs (5cents/MB) before inserting into the database. My question, is the total KBs gained from $5 will have to be split into 2 halves, 50% for Upload Data Qouta and 50% Download Data Quota? If this so, what will happen if the user does more upload than download and vice versa, for example he/she ran out of KBs in Download Quota but still have alot of KBs in the Upload Quota? How do you deal with this kind of issue? Is there a workaround to fix this problem? Can we have one field that combine both Upload and Download Quotas? The user will get annoyed knowing that he/she just put in $5 but get to download only half of the total KBs and not knowing that the other half is in the Upload Quota.
At the meantime, I am in the testing phase but I need to resolve these issues before buying your software.

I look forward to hear from you soon.

Thanks in advance,
ruurd.
_________________
How to use firstspot for usage based (data transferred) instead of time based and display on info window the remaining $ or MB instead of remaining time?
Back to top
alan
Forum facilitator


Joined: 26 Sep 2003
Posts: 4435

PostPosted: Fri Nov 09, 2007 5:22 am    
Post subject:

Currently upload and download quota are 2 separate values. If one of the quota is reached, he will be suspended. We are considering combining them in the future.

Also, we don't split quota into 2 halves. They are basically 2 separate attributes (again, refer to chapter 5 for the exact fields). In most of the case, the user will focus more on download, so you might want to allocate more quota for the download in your script.
_________________
~ Patronsoft Limited ~
Back to top
hmarcbower



Joined: 06 Jul 2006
Posts: 33
Location: Oshawa, Ontario, Canada

PostPosted: Fri Nov 09, 2007 5:23 pm    
Post subject:

Is there a quick php hack they could apply so that both upload and download traffic are subtracted from both values at the same time? Then, if, for example, a user pays for 100MB of transfer (up or down), you would write 100MB in both quota fields, then for every byte transferred (up or down) it would count against both the upload quota and the download quota?

I haven't installed v5 yet to have a look around to see how I would do this, but it seems like it would be do-able as a hack. :)
Back to top
ruurd



Joined: 27 Oct 2007
Posts: 5

PostPosted: Sat Nov 17, 2007 9:22 am    
Post subject: Password encryption

For password encryption before inserting the new record into mysql, I am using the program provided by firstspot "encrypt_pwd.exe". I use exec() command to call this file and it works - it produces an encrypted password. But when I try to authenticate through the web portal, it failed. I observed that the encryption generated by the exec() command is different from that generated by firstspot when inserting the new user in the configuration manager. How do i make my script to produce the same encryption result? Can somebody help me with a script to achieve this? This is the only problem I am facing before I can make everything works.

Thanks,
Ruurd
_________________
How to use firstspot for usage based (data transferred) instead of time based and display on info window the remaining $ or MB instead of remaining time?
Back to top
alan
Forum facilitator


Joined: 26 Sep 2003
Posts: 4435

PostPosted: Mon Nov 19, 2007 5:54 am    
Post subject:

Maybe you include the carriage return? Try to run encrypt_pwd.exe in the command to experiment with it.
_________________
~ Patronsoft Limited ~
Back to top
Display posts from previous:   
Post new topic   Reply to topic    FirstSpot Forum Index -> Pre-sales Support Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group