Answer the question
In order to leave comments, you need to log in
How to implement the mechanism of buying virtual goods?
Hello, there is a task to create a site for the sale of video courses, i.e. the user registers and gets into his personal account, but the video courses are not available to him (not clickable, for example), he pays and then only they become available, one by one or all at once. Is it possible to implement this on Zend Framework or Laravel, for example, and where can I find such information or articles?
Answer the question
In order to leave comments, you need to log in
Realistically, only any video file can be copied after a single viewing. I would make a secure storage (there was already one) with a scheduled ID change and a denial of access without authorization. On any PHP framework. The only thing I did with PDF files is that there may be problems when playing.
That's what frameworks are for, to do what needs to be done and to do it with a ready-made set of tools at hand.
Think over how and what should be interconnected, build the architecture for a start "on paper", everything else depends on your knowledge and experience in the language. I made such a site a year ago, as Sergei S.
rightly noted , the main problem is to think about how to protect the content so that it is not leaked.
Video copy protection is an impossible task. Of course you can block access. Lots of mechanisms. Any php framework will do for this. In short, when you click on the link to the video, you check the authorization and payment and give the content or generate a temporary link by which you give the content. It is hardly possible to get by with one article. you need to choose a framework and break your task into several smaller ones. As questions arise - ask (more specific).
Specifically on the choice of framework - I like yii, but if I choose only between Zend Framework or Laravel, I would choose the second one. But I repeat, the problem is solved on any of them.
In your question, you don’t need to choose a framework at all - it’s nothing from the word “absolutely” here.
Sit down, think about how you can generate a new link to the video for the user every time, so that even when the browser window is updated, the link changes, and the mechanism for generating this link based on authorization data, and just one variable - the fact of payment (true or false). The mechanism can be thought out to the smallest detail - up to giving the client video in pieces of 512Kb, organizing it all in tandem with a self-written video player on the site that will work with these pieces, and after receiving each, send some kind of checksum in response. The mechanism can be brought to the ideal - this is when it will be easier for a pirate to pay for a course than to fuss with getting these pieces of video and glue them together later.
Do not bother yourself with any frameworks until you have solved this problem. And then this implementation can be screwed anywhere - the question will already relate to the framework. In the meantime, the framework has nothing to do with it.
You have already been correctly told, it's not about the framework, but about the way or method of how to protect your content.
You can use CDN services, they (services) are not as expensive as it seems at first glance.
In addition, get what you need, link signing (each user has their own link), the ability to show the course in HLS format (this is when the video file is not given to the user in one piece, but in fragments) it will be difficult to steal such a stream.
And if your courses are popular, then it is easier to accept the load on the CDN, and pay for the resources actually consumed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question