What was that App on iPhone they used to locate their cell phone?

In the movie Hangover III there was a scene that Bradely Cooper used an App on an iPhone to locate their other phone (which was in Las Vegas). What is that App's name? How does it work?

Ok so the apps called "find my iPhone". And basically how it works is you simply turn on the setting on your apple device and if you ever misplace your device, all you have to do is go on another apple device, download the app "find my iPhone" and sign into your Apple ID (email). After that it will show you the exact location of your apple device and give you options to lock, wipe all data or even send a message to the phone saying it is lost. But these advantages can only be done if the lost phone is on with the SIM card is in place. Glad this helps.

Find My iPhone. You log in using your Apple ID & it uses the phone's GPS to be able to find it & tell you where it is. Also can remotely lock it, wipe the data from it as well.