Location: PHPKode > scripts > YouTube URL parser > teste.php
<?php
    require_once('youtube.php');
    
    $yt  = new YouTube();
    
    $ids = array( $yt->getId('http://www.youtube.com/watch?v=r0xO-vvdgok&feature=topvideos'),
                  $yt->getId('http://www.youtube.com/watch?v=hLZIBO8szRM&feature=topvideos'),
                  $yt->getId('http://www.youtube.com/watch?v=McfFTm-uNuI&feature=related'),
                  $yt->getId('http://www.youtube.com/user/csoares289#p/c/7D3AECB805EE5786/4/t_c3rPXICY8') );
    
    echo '<style>th,td{border: 1px solid #000}</style><table><tr><th>ID</th><th>Generated Link</th><th>Embedded Video</th></tr>';
    
    foreach( $ids as $id ){
        echo "<tr><td>$id</td><td>", $yt->generateLink( $id ), '</td><td>', $yt->generateEmbedded( $id ),'</td></tr>';
    }
    echo '</table>';
    
?>
Return current item: YouTube URL parser