Sure thing! I think you understand correctly.
"How can I receive these events? I suppose I should receive a json text. I have a php page. Following syntax is correct? $json = file_get_contents('php://input');"
Strava will POST to the URL you set when creating the subscription. So, if that URL is
https://myStravaApp.com/callback.php, then Strava will POST to that URL and the body will be something like
{
"aspect_type": "update",
"event_time": 1516126040,
"object_id": 1360128428,
"object_type": "activity",
"owner_id": 134815,
"subscription_id": 120475,
"updates": {
"title": "Messy"
}
}. See
https://developers.strava.com/docs/webhooks/.
Using the example above, you could then send a subsequent request to get the details for the activity with ID of 1360128428.
I authorized strava and I need to get activities. I don't want to upload or modify existing activities. I only need to receive running or cycling activities data with the entire set of informations (gps track points, hr, power, laps, segments,...)
If getting details on existing activities is your goal, then a subscription might not be the best match for your app. Subscriptions are helpful for when you want your app to take some action for every new (or modified) activity, for example, to set a weather report in the description. For getting existing activities, I would look at calling the API directly. You can call
/athlete/activities to get a list of activities. The athlete for which the request will return results is based on the access token you pass in the request. Then, you can call
/activities/{id} to get the details for a single activity by the activity ID. You don't need a subscription for either of those calls, only an access token.