Proxy script (or proxy program) is a script, wich is located between the user's browser and the "target server". Here I'would like to make a simple demo for PHP-Jquery-script proxy method. So far in my blog I just use YouTube API v.3 and JavaScript-jQuery to find videos. This time I try to use PHP language and jQuery to find videos. We often hear about "Web scraping with PHP," which can be roughly considered to include 9/10 PHP and 1/10 jQuery. Now I want to do it again but with 1/10 PHP and 9/10 jQuery. This page ("php-jquery-proxy.html") is for web scraping using mainly jquery-ajax in combination with only one function from PHP language (get_file_contents function). Using it I can get video ids, video titles from the source code of youtube pages and watch those videos continuously. To use this page you don't need to have Youtube API-3 key but need to download from Internet the XAMPP package...
Creating a video player using HTML5 is not too difficult. But it only plays some video formats such as MP4, OGG, WEBM. To watch more video formats, we must use the HTML5 video player plugin. I tried "Mediaelement.js" and found it great: in addition to the above mentioned formats, it can play YouTube, DaylyMotion, SoundCloud, Facebook, Vimeo, HLS, Dash, FLV and others. In the samples by "Mediaelement.js" I choose only two examples close to satisfy my needs. However in the sample for playlist, the player only plays mp4, mp3, ogg, webm and youtube. Meanwhile, the demo file can play a lot of formats but only play 1 video (when it is clicked) and stops. All the scripts are very short. Most just include only one function with multiple arguments to build the player. Nothing more. So I looked at the source code of the "mediaelement-js.com" page, where all js files are online and have more functions. However, it is very difficult for me...
After reading this post please continue reading the following one: http://phanhung20.blogspot.com/2021/03/copy-source-code-for-ytvideo-playhtml.html To see how this file works please go to this post: http://phanhung20.blogspot.com/2021/02/javascript-searching-for-youtube-videos.html Tap button COPY. Use your ipad: open Koder code editor app and create new file ytvideo-search.html. Tap this file name to open it and paste the code to it. Find the line: mykey = 'PASTE-YOUR-API-KEY-HERE' and paste your key there. COPY Please complete following steps: Obtain Youtube API key for yourself. Install Koder code editor app to your ipad. Create two files ytvideo-search.html (5 KB, without help text) ytvideo-play.html (25 KB) To do that, open my blog phanhung20.blogspot.com and copy source code for those files. Open Koder app, tap the button + in the left bottom ...