SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict Latox's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Grabbing information

    I am doing it fine for another part of the source code, but this one I'm having difficulty with because of the ' marks in the code.

    http://www.youtube.com/watch?v=GibLntdLiJA

    View the source, I need to grab whatever is in:

    'VIDEO_TITLE': 'Dizzee Rascal - Dance Wiv Me',
    So I need to grab Dizzee Rascal - Dance Wiv Me from this code..

    PHP Code:
    preg_match('!.*?\'VIDEO_TITLE\': \'(.*?)\'!'$page$matches);
        
    $title_text $matches[1]; 
    I'm doing it like this... it seems to work, is it ok doing it like that?
    :-)

  2. #2
    SitePoint Wizard frank1's Avatar
    Join Date
    Oct 2005
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    seems ok as it grabs every thing followed by video_title:

    any way i think many php classes are available for it...
    when i wrote one...i used xml of the video...which is more standard....


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •