How can I determine if a vimeo URL is a video? PHP

listed in answer

How can I determine if a vimeo URL is a video? PHP
0 votes, 0.00 avg. rating (0% score)

ANSWER:

Try this code:

$urls = parse_url($url);
if ($urls['host'] == 'vimeo.com')
    $vimid = ltrim($urls['path'], '/');
    if (is_numeric($vimid)) 
        // do something with $vimid
    
}

We assume that all video IDs are numerical.

by VisioN from http://stackoverflow.com/questions/10525849