Getting Dailymotion Video (FLV) URL

Some developers asked me, if it is easy to get dailymotion flv URL? I thought, I would post how to do that.

If you know the dailymotion video-id, believe me it's very simple to do that. In case, you don't know how to get dailymotion video-id?  Let me give you some hints, highlighted text is the video-id:-

Once you have video-id, you can use the following php-script (dailymotion.php.txt) to do either of two things:-