The basic logic is like this.
- Third party makes a http request to your application, like the same way a user query an API
- Your blank application should response with a valid format, lets say a json or html content.
- Third party read the response.
Let me show and scenario.
You have a website site called stats.com that display stats from another website of your domain called hello.com. Into hello.com there is a blank application that summarize the total of users of your site, so, your blank application could looks like this:
sc_lookup(dataset, "select count(*) from users" );
$total = {dataset[0][0]};
// The step 2 is happening here
header('Content-Type: application/json');
echo json_encode(['total_users' => $total], JSON_PRETTY_PRINT);
When you open the blank application via web browser you will look this:
{
"total_users" => 45
}
How does stats.example.com read that content? If the third party is using PHP then you can do:
// The step 1 is happening here
$content = file_get_contents('http://hello.com');
// The step 3 is happening here
$stats = json_decode($content);
echo "There are {$stats->total_users} users online";
Take a look where evey step is triggered. This is a very basic example using a json format, but can use html, xml, plain text, or whatever. Also, your third party in some cases can use PHP, javascript, or any language that supports the format returned