Before you configure the HTTP/HTTPS endpoints subscription through the AWS management console, you need to make sure that the HTTP/HTTPS endpoints of your PHP website have the capability to handle the HTTP POST requests that Amazon SNS generates. There are many types of SNS messages like SubscriptionConfirmation, Notification, and UnsubscribeConfirmation. so your PHP code needs to get the header "x-amz-sns-message-type" from the request and process it based on the message type. For the SubscriptionConfirmation message, your PHP application needs to process the POST message body, which is a JSON document. In order to subscribe to the topic, your PHP code needs to visit the "SubscriberURL" specified in the JSON body. Optionally, you should verify the signature to make sure of the authenticity of the message before subscribing to the topic. You can go through the AWS documentation here.
Do you want to master AWS? Then do check out the AWS Certified Solutions Architect Professional training by Intellipaat.