Method for detecting at least one rider with a smartphone (14-1, 14-2) in a vehicle driven by a driver with a smartphone for managing and optimizing their shared trips, a server, connected to the Internet global communication network, which can be joined by each of the smartphones using its IP address, with said server being able to join each of said smartphones so as to establish communication, characterized in that it comprises the following steps: - Association with the driver of the vehicle of an identifier ID10 of short-range identification means that cover essentially the size, i.e., the volume of said vehicle, - Detection of this identifier ID10 of the identification means by a smartphone 14C associated with the driver with an identifier ID14C, - Recording in the server of the identifier ID10 of the identification means associated with the driver, the identifier ID14C of the smartphone 14C of the driver, the location L14CE of the entry into the vehicle, and the timestamp H14CE of the entry of said driver into the vehicle, this information to be recorded in the server being transmitted to the server by said smartphone, - Recording in the server of the identifier ID10 of the identification means associated with the driver, during the entry of a rider into said vehicle, of the identifier ID14-1 of the smartphone 14-1 of this rider, the entrance of the rider being detected by the smartphone of said rider in short range communication with the identification means and recording in the sever of the identifier ID14-1 of the smartphone of this rider of the identifier, of the location L14-1E during the entry of the first rider into the vehicle, and of the timestamp H14-1E of the entry of said rider into the vehicle, information to be recorded in the sever being transmitted to the server by the smartphone of the rider, - Movement of the vehicle, - Recording in the server, of the exit of said rider from said vehicle, detected by the smartphone of this rider in communication of the in short range communication with the identification means, recording in the server of the identifier ID10 identification means associated with the driver, of the identifier ID14-1 of the smartphone, of the location L14-1S of the exit of the rider from the vehicle, and of the timestamp H14-1S of the exit of said rider from the vehicle, information to be recorded in the server being transmitted to the server by the smartphone, - Calculation of the trips made by the driver and by said rider. - Association with the driver of the vehicle of an identifier ID10 of short-range identification means that cover essentially the size, i.e., the volume of said vehicle, - Detection of this identifier ID10 of the identification means by a smartphone 14C associated with the driver with an identifier ID14C, - Recording in the server of the identifier ID10 of the identification means associated with the driver, the identifier ID14C of the smartphone 14C of the driver, the location L14CE of the entry into the vehicle, and the timestamp H14CE of the entry of said driver into the vehicle, this information to be recorded in the server being transmitted to the server by said smartphone, - Recording in the server of the identifier ID10 of the identification means associated with the driver, during the entry of a rider into said vehicle, of the identifier ID14-1 of the smartphone 14-1 of this rider, the entrance of the rider being detected by the smartphone of said rider in short range communication with the identification means and recording in the sever of the identifier ID14-1 of the smartphone of this rider of the identifier, of the location L14-1E during the entry of the first rider into the vehicle, and of the timestamp H14-1E of the entry of said rider into the vehicle, information to be recorded in the sever being transmitted to the server by the smartphone of the rider, - Movement of the vehicle, - Recording in the server, of the exit of said rider from said vehicle, detected by the smartphone of this rider in communication of the in short range communication with the identification means, recording in the server of the identifier ID10 identification means associated with the driver, of the identifier ID14-1 of the smartphone, of the location L14-1S of the exit of the rider from the vehicle, and of the timestamp H14-1S of the exit of said rider from the vehicle, information to be recorded in the server being transmitted to the server by the smartphone, - Calculation of the trips made by the driver and by said rider.