I am developing a video hosting site for use by teachers to distribute instructional screencast videos to their students. I http pseudo stream flv files from a lighttpd server to embedded JW Players. All is working well with that. I also allow my teacher to embed selected YouTube content in their playerlists. Right now the JW Player just calls the videos directly from YouTube using the YouTube API. That works well too. The issue is when kids try to watch YouTube videos at school, the school’s filter blocks all YouTube content. My teacher’s have asked me to look into using my lighttph server as a proxy server for youtube to get around the filter.
I have zero experience with proxies. I think I should be able to use the proxy module in lighttpd to make youtube.com “look like” mydomain.com to the school’s filter, I just don’t really know where to start. The other complication is that when the player calls a YouTube video, it get’s redirected to lots of other URLs some youtube.com and some other domains. Those all also need to be handled by the proxy.
Can anyone provide any insight or advise? Is what I am trying to do reasonable? Can anyone provide any lighttpd configuration code examples that might jump start me? Thanks very much! I appreciate any and all suggestions.
Thanks much for your advice! I think I may need to clarify what I am trying to do.
The server that would be used as the proxy is outside the school’s network and it is unfiltered by the school. Its domain is “approved” for students use. I can download youtube to the server and stream for there. That does work and we do it. I would like to save disk space on the server by having it proxy youtube and deliver it to the school’s network “labeled” as coming from its own approved domain. Since I can already control the use of that domain, I will be able to control the youtube content that students can access with it. The idea is to give teachers the ability to selectively grant student access around the filter.
This is a huge limitation that teachers in many school districts face. Youtube has a tremendous amount of content that we could and should be using with our kids, but because there is also “inappropriate” content there, most school districts simply filter out all youtube access.
safest solution would be to download the youtube videos to your local network, and link&stream them from inside your own network. Otherwise you would have to allow your proxy server youtube access at your school’s filter, however this won't bring you closer to your goal because then everyone at school could just watch youtube via your proxy.
I never used lighthttpd as a proxy, but WinGate7 (beta3) could handle this, let's you set up whitelists (for your allowed youtube video url's) groups etc. This is not a free product, but you can get a discount for schools and universities.
Related
I host a wiki with many YouTube links and have a script that checks them all regularly to make sure they still exist and are not blocked (by region). I'd like to also check for videos that are inaccessible due to requiring Premium Music membership, but I cannot find that data point in the API documentation.
Example of a restricted Premium Video: https://www.youtube.com/watch?v=NCRnj62bFOY
Thanks for any guidance.
As said #stvar it doesn't seem that any YouTube Data API v3 endpoint meets your needs. However you can bypass the need of the YouTube Data API by downloading the webpage https://www.youtube.com/watch?v=NCRnj62bFOY and checking whether or not this one contains "Music Premium". If so it is a Music Premium limited video.
All I want to do, with PHP and google-api-php-client, is create a new playlist and add it to my YouTube Channel server to server. All guides seem to require me manually clicking a link generated to authorize a token. What?!? With an API key shouldn't I just be able to do server to server changes/uploads/edits without any need of human interaction?
I enabled the API, created API Keys and OAuth ID/Secrets, but still can't figure out how to do it.
Any guide would be appreciated. Server to Server, with PHP, without me needing to open the file in a browser to allow access to account.
Thanks
Tried this: https://developers.google.com/youtube/v3/code_samples/php for adding a playlist and can't get it to work, even after clicking the link and allowing access to account.
You want to start learning something called OAuth. Don't worry, it's only sounds scary. I'll try and ease it a bit for you. But before I begin, no amount of loitering around avoiding that OAuth thing is going to get you anywhere. Good news is: it's not that twisted.
Imagine you were YouTube. An application, say a web application someone wrote that you didn't know about were to come to you making an HTTP request on you.
The request were to say, "Hey, YouTube chum! Can you add this bunch of erotica to John's playlist and just make it all public for everyone to see?"
What would be your response?
If I were YouTube, mine would be --
"Yeah! fook you, dude! Go ask John first! Then, show me some proof that you did."
"And wait a second, before you leave, I forgot to ask, who the fook are you, in fact? You got something to show me for who you are?" I, the YouTube, would add.
You see the problem? For YouTube, there are really two parties involved in this transaction:
The application that's making the sleazy request; and
Poor John, who probably knows nothing of all this even when he should.
Otherwise, what's to stop any application asking YouTube (or Facebook or Google or Github or any place else) for John's data?
So, as far as YouTube is concerned, it needs a way for the application to authenticate itself with YouTube (thus the Application Id and Client Secret or App Secret you created on the Google Developer Console), and it needs John's permission to let the said application do what it is asking you (YouTube) to do (thus the need for John to interact with a UI).
Enter OAuth.
OAuth is a document of rules that allows this co-operative transaction. But for it to work, all the three, YouTube, the web application, and John, must first conspire together.
There are three parties in OAuth:
The OAuth server -- that has John's data. In this example, it was YouTube.
The third-party application that wants to do something with John's data that's kept on the OAuth server, i.e. YouTube.
Poor John, a user on the OAuth server (YouTube), and also wanting to use the third-party Web application that wants YouTube to do something with John's data.
Now, there's a whole lot to learn about OAuth before you write a single line of code, and I can't write it all here but here's a YouTube playlist that starts by explaining the very basics of OAuth and then provides demos in (sorry, no PHP) C# and also in JavaScript.
Once you understand the OAuth transaction mechanism and see some code, then re-visit the YouTube API documentation page you linked to and it'll start to make an enormous amount of sense. It'll click and you won't need to look any place for help writing that example. It'll just come out of you like poop. :-)
I need to have people sending videos directly to my customer's Youtube account.
My customer doesn't want to have people login with their own Youtube account. This has to be transparent for people so they are not forced to have a Youtube account to send videos.
I found several solutions like Youtube Direct lite or the Youtube Widget but this is not exactly what they need as it force them to log to their own account... Same with Youtube API and OAuth2...
Is there any solution with the YouTube Data API v3 even if this is not really "best practice"
?
(I'm using PHP on Codeigniter)
Best regards.
I've just done a search on Google and found
http://tuts.stackarena.com/2013/03/uploading-videos-to-youtube-from-your-website-in-php/
It may also be worth checking out https://developers.google.com/youtube/ for additional resources, usually you find Google will have a solution for your needs.
Good luck
Youtube is banned in turkey. So i want allow people to see youtube videos from my site.
Basically my site will act as a proxy for users to get access to youtube videos.
I also want to provide user to search youtube vidos on my site. And allow the user to play and download the videos.
I will prefed do the above thing in j2ee/jsp/php.
Can a applet be used in this situaltion. If yes how??
I want to devlop siter like video75.com which is the example of what i am trying to achieve. This site is not banned in turkey.
That sounds like a perfect way to get your site banned in Turkey, as well..
To enable users from Turkey to browse the web without restrictions, I would recommend something like TOR
I don't have experience if tor works with YouTube.
There is an open source asp.net proxy app, you can get some hints from it.
http://sourceforge.net/projects/asproxy/
http://www.codeproject.com/KB/aspnet/asproxy.aspx
Jsp/php can be used with the same approach.
When you go to edit your favorite music or movies on Facebook, you will notice an autocomplete suggest list that is basically a list of "everything" (brand names, music artists, movies, etc.) How can someone consume that list in their own code? Is it part of the Facebook API?
They wrap some of the functionality in their FBML fields, but their developer wiki shows how they do what they do. If you want to consume their data though, you're going to have to play with an HTTP proxy and figure out what parameters to send to their server. There are also a couple parameters that seem to be session based, so I don't know how well you're going to be able to integrate this into your own application.
This was working for awhile, but now they require the session cookie, so we'll have to hope they add support for this to the graph api, unless you want to fight w/ the proxy.