I'm creating a video sharing website like YouTube. I want to make it so that it is difficult to download the videos to your hard drive. I want them to still be able to download the videos into F4Player just like any other video.
I am going to make it so that when somneone requests a video using the ID, a PHP script uses the ID to find the real filepath to the video. The PHP script then passes the video, that way no one will find where the video is actually stored. I also have htaccess set up so that no one can hotlink to my images or videos.
What else can I do?
EDIT: If it was the only way to get what I need I'd be wiling to make my own player in Java instead of using F4layer, but I strongly prefer using F4Player.
Write your own client side browser plugins, that would handle your proprietary encrypted connection to the video stream.
Related
I have to build an application where users can download videos from a site but cannot share them. My first solution is to save these files in a hidden location on the users computer since one of the requirements is that the user should be able to watch the downloaded videos offline.
Please how do I go about saving a file in a location the user cannot see using php.
Thanks.
One solution is to generate token for each request for a video. That token would have its lifetime. Php script should be serving the content instead of giving direct access to resource to user. The script should check if the token is still active before serving the content.
It is up to you how to pass the token. The simplest way is to make it contained in uri.
No matter where you put your videos in your directory structure, you always send the data as a partial request. Once data is acquired by the user, it could be saved an reproduced.
There are techniques, however, to protect your video from direct download through curl, wget or other ways of download. And this is using a secure token and an expiration, passed as parameters. This way your video download window will be limited and generating the token manually would be pretty hard.
Chidiebere Onwunyirigbo, its a Great Question. One solution for your requirement is Steganography. It is the process of concealing your data (videos) behind other files (multimedia files like image, audio, video), in your case preferable would be Image Steganography. It is quite a old technology but new to many, you can get several ready tools/code for it on the internet which you can customize as per your need. From your side you have to provide the file that is already embedded inside the image for download. Only the tool coded for retrieval and rendering the hidden video can render your video. So, for this part all the users of your site have to first download this desktop application from your site for viewing the video. This will keep your videos safe on the users computer offline, because every user who takes the video will require the reverse steganography tool to be downloaded from your site. You can even embed secret info like users IP inside the Stego image along with the video and for each tool download, associate user computer's IP with the tool. If IP embedded inside Stego image matches with that of tool only then you allow to play else redirect application to get it registered. But the limitation would be that, the users will have to download your application and will be able to view videos only on your desktop application which will render the Steganographed video.
You cannot hide information on the user computer. Even if your process are running on a windows comp as SYSTEM user, a power user can take ownership of the files.
The only solution you have, are developing or using a known DRM system, for allowing only playing the video on a determined computer or another specifications (for example, if the program have the authentication token of some user).
At any case, you need to do two things for this:
- You need a custom application to play the video, if you want to check DRM.
- You need to recode / modify something on the video before download, for adding on them a code for allow only play on the destination computer or data used for authenticating DRM.
How can I embed a video in a website with html/php, so it can't be downloaded by a visitor? The visitor can just view the video but can't download it.
If you are trying to stop someone 'stealing' the video then at the end of the day you can't - if the video plays on the users browser then it has to pass from the server to the users machine and a malicious user can capture it one way or another.
If you mean that you just want to default action to be that the video plays back rather than downloads, then using the standard HTML5 tag in the default way will provide this behaviour.
Assuming it is the 'stealing' case you are worried about then DRM is the technology most often used to address this concern - this encrypts the video so that someone copying it will not be able to play it back without the correct key. How you manage the keys is obviously critical but most of the common DRM providers will have established ways to securely manage the keys. The technology is quite complex so using a hosted video service which supports DRM might be an approach to consider (e.g. https://support.brightcove.com/en/video-cloud/docs/content-protection-drm or http://corp.kaltura.com/Products/Features/DRM).
In your situation, right-click protection can make sense. This feature protects your video from unwanted downloads and works on any website. It blocks downloading on right mouse click and restricts accessing the file’s original source code. Optionaly, you can add a text or link to be shown on right mouse click that directs people to your website when they try to download your video. Learn more here
I'm trying to allow users to take pictures with their webcams and save it. How can this be done? I am looking for something similar to Facebook or dailybooth in terms of their UI. I know smoe PHP/jQuery but I'm also wondering how I could save the pictures once "taken"?
The Facebook webcam thing is made using flash as you can see here:
This is all pretty easy to achieve with Flash (the actual capturing of what the webcam can see). I'm not sure how developers get from there to uploading the image to a server, though.
If you have knowledge in Flash / ActionScript 3, then this will get you started:
Camera.getCamera()
I have the necessity to upload some photos to my server (giving users the capability to), but before doing it, I need the user to be able to resize the photo, like they do in picasa when the pic is to big, or online in this sites, reducePhoto.com or shrinkPictures.com
that is task one... now for the second task, need to add some ftp functionality, so the user can upload the photos to the server(like filezilla style, but with some web site front page that the user just select what to upload, and clicks "upload")
hopefully using PHP
Thanks!
I'm not a php expert, but it looks like there are image functions available. See the php api:
http://vn2.php.net/manual/en/book.image.php
and notably, the imagecopyresized function:
http://www.php.net/manual/en/function.imagecopyresized.php
As for uploading files via a website form..there are tons of exmamples of this online. You should try google first.
http://www.tizag.com/phpT/fileupload.php
I need to upload video files through Facebook application and later visualize all uploaded videos so that people can vote for a video they like. I searched and read some articles, but I still have questions that are not completely clear for me:
Is it better to use iframe or FBML
If I use iframe is it possible to use input type="file" and PHP to handle the uploading just like on a normal page (not with Facebook PHP SDK)
Please give me an advice what direction to take.
Uploading to Facebook using their API is notoriously difficult; first of all check out the thread on the faceboook dev forum.
I would recommend doing it in an iframe, and you'll need about 60 cigarettes and several large whiskeys to get it working.