A script to Recieve Incoming SMS using PHP Programming Language.
Save this file as incoming_sms.php
If $_GET method is not working then try $_REQUEST method.
After creating this file, upload to your web server and give out the URL to your SMS provider.
Example code has been used for SMSGatewayCenter.com's Incoming SMS parameters. If the provider is different then you need to change the parameters as per the SMS provider's documnetation.
Make sure you sanitize the data.
More detailed script explanation given here, https://www.smsgatewaycenter.com/blog/php-script-retrieve-shortcode-incoming-sms-data/