There are two apps that will do what you want as long as the phone is connected to a network.
Both will only work from another iDevice though, and only when interrogated. The one I use is "Find My Friends". I think it's native to iOS, but if not it's on the App Store.