PHP Script To Switch Traffic on Azure App Service Slot

Job ID: 33499096

Budget: $8 – $15 USD

I need a PHP script which I will use as a template for devops scripting that I want to do. I need the script to:
1. Connect to Azure by API
2. Determine which slot on an app service has 100% of the traffic (slot 1 or slot 2)
3. Switch the traffic to the other slot
4. Restart the slot that is now not getting traffic

I only want to work with a developer who has Azure API experience so that they are not doing what I can do - google and cut and paste. I want someone who knows how to do it.
Related categories: PHP Azure