php XML

How can i get value from xml

i want get rtsp url from youtube Gdate
how can i get media:content url= by php xml

http://gdata.youtube.com/feeds/api/videos/gwrbXKvEgWI?v=2&prettyprint=true

here is XML file

<?xml version='1.0' encoding='UTF-8'?> tag:youtube.com,2008:video:gwrbXKvEgWI 2012-12-17T16:54:59.000Z 2014-09-14T18:41:00.000Z Romantic Hindi Songs ᴴᴰ - YRF Huge Video Collection - Vol.1/4 YRFMusicBollywood http://gdata.youtube.com/feeds/api/users/YRFMusicBollywood kHHBhnn6TMbHrywR0preDg Music yrfmusicbollywood 1. Tujh Mein Rab Dikhta Hai - Rab Ne Bana Di Jodi (2008) 0:00 2. Koi Ladki Hai - Dil To Pagal Hai (1995) 4:58 3. Dil Laga Na - Dhoom 2 (2006) 10:46 4. Pairon Mein Bandhan Hai - Mohhabatein (2000) 15:50 5. Ghar Aaja Pardesi - Dilwale Dulhania Le Jayenge (1995) 25:37 6. Solah Button - Darr (1993) 30:26 7. 8. Johi Mahi - Bachna Ae Haseeno (2008) 35:54 9. Chupke Se - Saathiya (2002) 41:10 10. O Re Piya - Aaja Nachle (2007) 45:39 11. Hum To Bhai Jaise Hain - Veer Zaara (2004) 51:49 12. Chanda Chamka - Fanaa (2006) 56:40 13. Humne Suna Hai - (Mere Yaar Ki Shaadi Hai (2002) 1:00:28 14. Chup Chup Ke - Bunty Aur Babli (2005) 1:05:32 15. Jhallah Wallah - Ishazaade (2012) 1:12:45 16. Toch Me - Dhoom 2 (2006) 1:17:04 17. Haule Haule - Rab Ne Bana Di Jodi (2008) 1:22:19 18. O Dholna - Dil To Pogal Hai (1997) 1:27:56 19. Main Yahon Hoon - Veer Zaara (2004) 1:33:42 20. Are Re Are - Dil To Pogal Hai (1997) 1:39:01

James Jeff Zanuck</media:description>
media:keywords/
<media:license type=‘text/html’ href=‘http://www.youtube.com/t/terms’>youtube</media:license>
<media:player url=‘http://www.youtube.com/watch?v=gwrbXKvEgWI&feature=youtube_gdata_player’/>
<media:thumbnail url=‘http://i.ytimg.com/vi/gwrbXKvEgWI/default.jpg’ height=‘90’ width=‘120’ time=‘00:52:19’ yt:name=‘default’/>
<media:thumbnail url=‘http://i.ytimg.com/vi/gwrbXKvEgWI/mqdefault.jpg’ height=‘180’ width=‘320’ yt:name=‘mqdefault’/>
<media:thumbnail url=‘http://i.ytimg.com/vi/gwrbXKvEgWI/hqdefault.jpg’ height=‘360’ width=‘480’ yt:name=‘hqdefault’/>
<media:thumbnail url=‘http://i.ytimg.com/vi/gwrbXKvEgWI/sddefault.jpg’ height=‘480’ width=‘640’ yt:name=‘sddefault’/>
<media:thumbnail url=‘http://i.ytimg.com/vi/gwrbXKvEgWI/1.jpg’ height=‘90’ width=‘120’ time=‘00:26:09.500’ yt:name=‘start’/>
<media:thumbnail url=‘http://i.ytimg.com/vi/gwrbXKvEgWI/2.jpg’ height=‘90’ width=‘120’ time=‘00:52:19’ yt:name=‘middle’/>
<media:thumbnail url=‘http://i.ytimg.com/vi/gwrbXKvEgWI/3.jpg’ height=‘90’ width=‘120’ time=‘01:18:28.500’ yt:name=‘end’/>
<media:title type=‘plain’>Romantic Hindi Songs ᴴᴰ - YRF Huge Video Collection - Vol.1/4</media:title>
yt:aspectRatiowidescreen</yt:aspectRatio>
<yt:duration seconds=‘6278’/>
yt:uploaded2012-12-17T16:54:59.000Z</yt:uploaded>
yt:uploaderIdUCkHHBhnn6TMbHrywR0preDg</yt:uploaderId>
yt:videoidgwrbXKvEgWI</yt:videoid>
</media:group>
<gd:rating average=‘4.0758276’ max=‘5’ min=‘1’ numRaters=‘17698’ rel=‘http://schemas.google.com/g/2005#overall’/>
<yt:statistics favoriteCount=‘0’ viewCount=‘11672588’/>
<yt:rating numDislikes=‘4089’ numLikes=‘13609’/>

It’s not clear what you are asking for:

Are you looking at how to get the data into php? use curl, or file_get_contents.

Opening the file? use simple XMLsimple
http://php.net/manual/en/book.simplexml.php

Sponsor our Newsletter | Privacy Policy | Terms of Service