It is possible to trace an iPhone online. In fact, Apple offers a service made specifically for tracking iPhones, iPads, and Mac computers called Find My iPhone.
Keep in mind that the Find My iPhone service must be setup on an Apple device prior to using the service. To track an Apple product's location, log into the device's assigned Apple ID account on iCloud.com. Select the Find My iPhone option. Select the device being tracked, and use the provided map on the Find My iPhone page to see where the device has been.
The service will show you where the device has been used within the last 24 hours. Remember that the device must be connected to the Internet to show up on Find My iPhone; if the phone has not been connected to the Internet, no results will show on the map.