My question is this: How do I use my main website to run the PHP script on the other website using REST or SOAP? Additionally, I need to send a variable to the other website that will tell it which table to retrieve data from. How can I send this variable to the other website using the same REST or SOAP api?
I expect that the working code should look something like the following:
Code: Select all
<?php
//REST example
$myTable = "TableOne"; //Database table name
$url = "www.MyWebsite.azurewebsites.net"; //Server URL
$script = "RetrieveData.php"; //Server php script
//I doubt that the proper code will look anything like this, but this is an example
rest_contact_website($url); //Locate the website
rest_assign_variable($serverVar, $myTable); //$serverVar refers to the variable in the server script that will have the value of $myTable assigned to it
rest_run_script($script); //Run the script
rest_close_connection($url); //Close the connection if necessary
?>