Overview: I need a simple PHP script that utilizes the YouTube API . The script closely follows the advanced search of YouTube. For this example I use the keyword "CERN".
I would input the following data:
keyword : CERN
results : videos
duration : short
language : english
category : all categories
this data is formatted on one line of the text file "[url removed, login to view]" :
Your PHP script would generated the following data:
YouTube Video ID : MjHals9hDz0
Video name : CERN and the LHC (Large Hadron Collider)
Length of video in minutes and seconds : 2:26
A number in series from 1 to 20 : 1
formatted as a new [url removed, login to view] file as follows, with pipes and no spaces :
MjHals9hDz0|CERN and the LHC (Large Hadron Collider)|2:26|1
KsZQOlJU_Hg|CERN Prepares New Atom Smasher to Study Big Bang|1:47|2
The complete [url removed, login to view] file will have twenty lines, with the last series number 20.
So, each keyword in the [url removed, login to view] file will generate one discreet txt file in a directory.
I have attached example input and output files for the keyword "golf".