Example:
http://www.dailymotion.com/video/x4xvnz_the-funny-crash-compilation_fun
How do I get x4xvnz
?
You can use basename
[docs] to get the last part of the URL and then strtok
[docs] to get the ID (all characters up to the first _
):
$id = strtok(basename($url), '_');