hide stream url

Hello - does anyone know how to hide a video stream url to the public using javascript?

Thanks.
epmoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shalom CarmelCTOCommented:
Sorry, you can't hide the url, because you can't hide the html.
If the html page is interpreted by the browser, then anyone can read it and see the video stream url.

ShalomC
0
Shalom CarmelCTOCommented:
quite obvious from the page source...
2 minutes of reverse engineering is all it took...

http://www.forbes.com/video/fvn/lists/tm_06billionaires_branson.vas?player=wm§ion=/video


ShalomC
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Shalom CarmelCTOCommented:
actually there is a technique even easier than reverse engineering the javascript:
using a personal proxy like achilles, paros or burp to trace the http requests.
The javascript can be as obfuscated as you want, eventually there is access over http to the video url.

ShalomC
0
Samuel LiewCommented:
This is because the browser somehow needs to know the URI to get the video from. If you want to hide the URI, you can try using Flash.
0
Shalom CarmelCTOCommented:
By using a controlled proxy, no url can hide from prying eyes, not even if it is embeded in a flashlet.
Why is it so important to you to hide the video url? Are you afraid of copyright infringement? do you want to charge money for viewing your stuff?
0
epmoAuthor Commented:
Thanks for your reply.

Is there a way to hide it then?

We need to hide it to avoid hotlinking and bandwith theft.
0
dbrittCommented:
Not really a JavaScript question anymore...but...

http://www.alistapart.com/articles/hotlinking

http://www.google.com/search?hl=en&q=prevent+hotlinking

Good luck w/ your anti theft endeavors ;)
0
Shalom CarmelCTOCommented:
Then why don't you put it on youtube.com? No bandwidth lost......
Actually, the way forbes did it will stop 95% of hotlinking attempts.
Heck, they succeeded to fool you :=>

ShalomC
0
Samuel LiewCommented:
I mean, why not use flash to play the video? It's one of the best ways to hide the source.

Hmm, what about Java applets then?
0
epmoAuthor Commented:
Thanks for your reply. Yes we need to charge for video content. They say flash can be hacked as well. We are looking for a windows solution to protect stream url's. there have to be something out there. Someone told us about .htprotect not sure what that is.
0
dcotrutaCommented:
Do you still need an answer to this?

It can be done very easily in .htaccess in your media folder.

General syntax is:

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !(YOUR IP GOES HERE)
RewriteCond %{HTTP_REFERER} !http\:\/\/\.yourdomain\.net/.* [NC] (this allows any page from your root to be the referer, you can remove the .* and add a particular folder.
RewriteRule \.(wmv OR avi OR whatever filetype you use)$ - [F]

Example:

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !1.2.3.4
RewriteCond %{HTTP_REFERER} !http\:\/\/\.www\.freevideos\.com/news-videos.* [NC]
RewriteCond %{HTTP_REFERER} !http\:\/\/\.www\.freevideos\.com/funny-videos/.* [NC]
RewriteRule \.(wmv)$ - [F]

Any site trying to access the streams (either by embedding or via Iframe will get a 403 Forbidden. Heck, if you type the url directly in the browser (or a media player) you'll still get a 403 because you don't have the correct referer (of course this can be circumvented with a referer spoofer but unless you are willing to invest in a membership system with full session control there is nothing more you can do.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.