ankur0101 Posted September 6, 2009 Share Posted September 6, 2009 Hello, I am planning to make a paid proxy website where users will have to pay for surfing. It will cover following aspects.......... When user will create account, he will have to pay by PAYPAL only. I want to provide instant activation i.e. when payment is made, it will instantly activate his account. Every user will get specific amount of MB for surfing. Suppose Mr.X is having his limit of 500MB, then he should be able to check how much MB he is used, how much is remaining. When quota is over, his account will be deactivated. So question is, I can manage user management, but how to make a/c activation after making payment ? How can I manage Bandwidth quota for each user ? Off course I am going to purchase VPS for this purpose. Can anybody help me ? :) Quote Link to comment Share on other sites More sharing options...
Grayda Posted September 10, 2009 Share Posted September 10, 2009 What sort of bandwidth do you want to control? Data usage or speed? Data usage is easy -- just call count() on the data you retrieve or inspect the HTTP headers for Content-Length: which will tell you how long the document is. Then you can just store that somewhere temporarily (in a database for example) and do some comparisons: <?php if($dataUsedSoFar >= $dataLimit) { return false; // or output a message if writing procedural code? } I don't know about limiting speed however. Maybe it's a question for your ISP who can limit those sorts of things? You might be able to do it in sockets, but I've never used sockets in PHP so I don't know. Anyone? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.