Hi! All , Is this possible that my customer can download Videos from my website when they pay me through any Bankor or by any other method ??? Let me try to explain my problem to you, I want to upload some videos on my website, then if any of my customer pays for a particular video. I will send my customer a Link and the customer shall download that particular video from my website. Waiting for your kind guidance …………. BR, Webarchadia.
Dear in our country Paypal is not working coming to the point, the site will be local customers only. It shouldnt be so Hi FI type...jus a protected area on the website where the videos are hosted and customer can reach ther after entering the pass word. Hope to receive some positive feedback. BR, Webarchade.
The easiest part would certainly be to have the videos hosted on some site, and just show the link to people who entered a certain password. You should be able to do that yourself. Now, the more challenging part: Host the videos yourself. I can't give you a complete script, but a few pointers. Let's say your domain is example.com. Put all the videos into the folder example.com/videos/, and set the permissions for the /videos/ folder so that outside users cannot access the contained files. The download links you give to the users will be something like example.com/getvideo/{videoid}/{uniquehash}/filename.mp4 (or any other file format). Use .htaccess to redirect all such requests to example.com/download.php?id={videoid}&hash={uniquehash} {videoid} should be some internal id of your video, and {uniquehash} a kind of password for that video - but every user gets his or her own password. maybe use the md5 hash of the file name, the user name, the request time, or anything else. Or everything combined. You can build something involving a download session database, since the download.php script can do pretty much everything. download.php will then process the incoming data, and if it is considered "valid", it will execute the following code: header('Content-Disposition: attachment; filename="' . $filename . '"'); echo file_get_contents("videos/" . $filename); (This script will throw an error if ANYTHING is echoed before the header!) I do, however, suspect that this script is very memory-heavy for large files. I use it for a small Facebook app, and its working fine - but the application has very few users since I never promoted it.
Dear Thomas, Really very elborative reply, but unfortunately I am a beginer and cant get any thing from your posivtive feedbakc i wish i could find a ready made script for this task.....any way thanks for the your precuous guidance and hepl... Hope to have some more fruitfull suggestions with real time solution for me .... Best Regard, Wenarchade