You may be able to do it all at once with [man]preg_replace/man, e.g.,
$uri = 'http://www.metacafe.com/watch/426491/max_payne_2/';
$pattern = '#^http://www\.metacafe\.com/watch/(.+?)/.*$#';
echo preg_replace($pattern, 'http://www.metacafe.com/thumb/\1.jpg', $uri);