PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
its kinda hard for me to explain the idea but lets give it a shot...
i have a classified type site which was till now free! but now i am planning to charge a fees of around $1 a year. since my site is sooo very local and i cant afford to use c card right now. i have come upwith an idea to sell these cards which has a alpha-numeric scratch-and-reveal type system.
now all the user has to do is buy the card, login make an add and in the end or after 7 days enter the code in their card and his/her ad would be active for 1 year!
in some countries prepaid mobile companies use the same system!
please help me out here! is there any class for this purpose?
much thanks in advance
I doubt you'll find the code for a system like that already written for you. Two reasons come into my head: firstly, it sounds pretty easy to develop. Secondly, people don't usually release code that is designed to make profit.
All you need to do is decide how many of these cards you want to initially produce, then, create a database table. Now make a script to populate this table with the same number of rows as cards that you're producing. Have atleast a field for the unique card identification numbers. Then print all these cards off with the numbers from the table. When one gets activated (entered into your system), credit the users account and delete the row (or just check the row off). If you're wanting to do expiration then you'll need a time stamp field too.
i plan to make around 60,000 cards in 6 months and one more thing i forgot to mention.
there are 2 types of scratch recharge option there is one $1 card for 1 year duration and another $2 for the life time duration.
how would this function workout? and adding 60,000 entries in a database sounds pretty server heavy! is there any way to make this an checksum type system?
60,000 will be alright. If not just make a cron job to do a thousand every second. Different cards is no problem, just add an extra field in your table indicating which type it is and when it's activated credit the user accordingly.
What is your definition of "life time".. Make sure terms and conditions are set well. Are you saying that in 20 years this site is running or customers have access to it's replacement if your "company" is around in 20 years ? Even worse is if you wish to change your pricing model again.
Not knowing your adverts what happens if you want to charge different levels for different types/formats of advert. If you want to insert an ad with a photo compared to a text ad, are they both free now and "forever". What about business users compared with personal users ?
As you are only local I will mention this but the costs are almost certainly too high.. How about getting an SMS from users via a mobile phone to unlock an account and have the "phone number" have an additional charge ?
thanks goblin ill ask the [s]ppl[/s] people responsible for writing the tos to redifine unlimited life offer to be limited an a way.
this should be quite cheap to manufacture, i think it can be done inhouse and it will give much more security too.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.