Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > PHP

Reply
 
LinkBack Thread Tools
Old July 7th, 2009, 09:15 AM   #1
Most Reputable Member
SuperMember
 
minute44's Avatar
 

Join Date: Apr 2006
Location: Nottingham UK
Age: 26
Posts: 1,406
Blog Entries: 3
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 minute44 is just really nice minute44 is just really nice minute44 is just really nice minute44 is just really nice
Retrieving data from a YouTube URL

I've had an idea for an app but only have some basic PHP knowledge.

I need to know the PHP to be able to enter a YouTube URL into a form field and then have it return the duration of the video along with the number of views.

Anyone?

Dan
minute44 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 7th, 2009, 09:57 AM   #2
Reputable Member
 

Join Date: Nov 2008
Location: Lexington, KY
Posts: 243
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 Dubbs is on a distinguished road
Re: Retrieving data from a YouTube URL

You can get the number of views if you have the url by getting the HTML source and parsing for

Code:
<div id="watch-views-div">
 <span id="watch-views"><span id="watch-view-count">15,482</span> views</span>
</div>
And getting the views from that.

You may also want to look into Youtube's API to see if there is an option to get those options with it.
Dubbs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Google ordered to hand over YouTube data welshstew The Café 22 June 22nd, 2009 02:27 PM
example of Inserting and Retrieving data from xml file hanusoft Classic ASP 1 September 25th, 2007 02:21 PM
retrieving and displaying line breaks nate2099 Databases 1 July 13th, 2007 05:56 AM
Setting/Retrieving Cookies Mike Henson HTML, XHTML and CSS 2 January 10th, 2006 05:34 PM


Search Engine Optimization by vBSEO 3.2.0 RC8