Kamran Jabbar
Kamran Jabbar

Reputation: 878

How to hide/encrypt vimeo video URL from source code in PHP?

I have following code

<iframe src="https://player.vimeo.com/video/250356669" width="740" height="370" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" __idm_id__="321146881">
</iframe>

It is my requirement to use only Vimeo videos so my question is how can I encrypt the video URL so that no user able to see that URL from where the video is coming from?

My requirement

 <iframe src="something-ecrypted-instead-of-vimeo-url" width="740" height="370" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" __idm_id__="321146881">

</iframe>

Any help will be aprecaited. Thanks.

Upvotes: 0

Views: 2659

Answers (1)

Mick
Mick

Reputation: 25491

Its worth noting firstly that the URL in your example is not a video URL but a URL to HTML 'page' which is inserted into your iframe. This HTML includes the HTML markup, player etc as well as the actual video URL for the video which will play.

If you just want to change your code so the code on your page shows no mention of Vimeo you could have an URL in the source for a proxy on your server which then redirects to the Vimeo URL.

However, as others have pointed out in the comments, this will not really divert or fool anyone who might actually want to understand the page or look at the source as it is very easy to follow the links or to monitor the network activity on a browser. IN very simple terms, if it is sent to your browser then someone can capture it.

If you are concerned with someone copying your material, then the standard approach is not to try to prevent people finding it, but to encrypt it and protect the keys with some sort of DRM mechanism. Vimeo say that they support DRM for 'select Vimeo On Demand partners' - not sure what exactly is needed to qualify for this.

Upvotes: 1

Related Questions