salman233 Posted May 31, 2011 Share Posted May 31, 2011 hello guys i am a newbie want help with how to upload a youtube in your script and in database i know about the $_files thing but how do i give a link please help me out !! Quote Link to comment https://forums.phpfreaks.com/topic/237971-want-help-with-youtube-video-upload/ Share on other sites More sharing options...
Kieran Menor Posted May 31, 2011 Share Posted May 31, 2011 I'm not entirely sure what you are trying to do. Could you try to rephrase the question? Quote Link to comment https://forums.phpfreaks.com/topic/237971-want-help-with-youtube-video-upload/#findComment-1222764 Share on other sites More sharing options...
salman233 Posted May 31, 2011 Author Share Posted May 31, 2011 actually i want to upload youtube videos in my script when i enter a link in the field it is uploaded and displayed and can be played on the page and can be saved into the database Quote Link to comment https://forums.phpfreaks.com/topic/237971-want-help-with-youtube-video-upload/#findComment-1222768 Share on other sites More sharing options...
Kieran Menor Posted May 31, 2011 Share Posted May 31, 2011 So, what. You want people to be able to upload videos to your site, which in turn will upload them to YouTube? Quote Link to comment https://forums.phpfreaks.com/topic/237971-want-help-with-youtube-video-upload/#findComment-1222771 Share on other sites More sharing options...
coolcam262 Posted May 31, 2011 Share Posted May 31, 2011 Hi, I don't think you want to actually upload the files, you just want to get the youtube videos and display them. It's not that difficult but you will need to use an xml file to get the youtube information. I think this tutorial is what you want: It's not the one I used before I don't think but it's made by the same person so it should be alright. Quote Link to comment https://forums.phpfreaks.com/topic/237971-want-help-with-youtube-video-upload/#findComment-1222775 Share on other sites More sharing options...
salman233 Posted May 31, 2011 Author Share Posted May 31, 2011 thanks alot @coolcam but actually i am a newbie and did,nt get your point Quote Link to comment https://forums.phpfreaks.com/topic/237971-want-help-with-youtube-video-upload/#findComment-1222788 Share on other sites More sharing options...
coolcam262 Posted May 31, 2011 Share Posted May 31, 2011 Well basically youtube tries to make it as easy as possible to allow you to do what you're doing. They create an xml file that tells you information about your latest videos. For example this is the xml of my channel: http://gdata.youtube.com/feeds/api/users/coolcam262/uploads It shows the latest videos I have created. To find yours just use the url http://gdata.youtube.com/feeds/api/users/username/uploads You can then look through it and you will find your videos. Of course you don't want to just display all this text, you want it to look nice! To do that you need to parse the xml to php. There's loads of premade functions for us to use but basically all they do is take the xml file and turn it into arrays! For example it might look something like: $youtube['videos']['1']['desc'] and this might show the very first video you made's description. One function that has been made is called xml2php that converts... xml to php! All you need to do is include the xml2php.php file in your code. Google how to use and download the function, it's really simple. I hope I helped! Quote Link to comment https://forums.phpfreaks.com/topic/237971-want-help-with-youtube-video-upload/#findComment-1222795 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.