<?php

/**
 *
 * @copyright  2022 mcpalo.com
 * @version    2
 * @link       http://www.mcpalo.com
 */

require_once 'sendhttp.php';

function collabora() {
	$login='abcdef';
	$password='ABCDEF';
	$file='file_example_PPT_250kB.ppt';
	$lang='en';

	$curl = 'https://collaboractor.com/api/v1/edit/' . urlencode($file);

	$args = array(
		'login'		=> $login,
		'password'	=> $password,
		'lang'		=> $lang,
	);

	$response=sendget($curl, $args);

	if (!$response or $response[0] != 200) {
		header('HTTP/1.1 500 Internal Error');
	}
	else {
		header('HTTP/1.1 200 OK');
		header('Cache-Control: no-cache');

		echo $response[2];
	}
}
