Folder Structure

crossdomain.xml

This file must be accessible directly in the root of the website, i.e. https://www.your-domain.com/crossdomain.xml.

The content of the file must be the following:

<?xml version="1.0"?> 
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> 
<cross-domain-policy> 
<allow-access-from domain="*" to-ports="*" /> 
</cross-domain-policy>

proxy.php

Our room needs this file for its communication with our Server. See below a sample implementation. This file must be in the same folder as the file of the room implementation.

$postDataToSend = array(
    'api-Key' => 'EDUDIP_API_KEY',
);
 
if (array_key_exists("proxyTarget", $_GET)) {
    if (MAGIC_QUOTES) {
        $proxyTargetValue = stripslashes($_GET["proxyTarget"]);
    } else {
        $proxyTargetValue = $_GET["proxyTarget"];
    }
} else if (array_key_exists("proxyTarget", $_POST)) {
    if (MAGIC_QUOTES) {
        $proxyTargetValue = stripslashes($_POST["proxyTarget"]);
    } else {
        $proxyTargetValue = $_POST["proxyTarget"];
    }
} else {
    die('Proxy target param is missing.');
}
 
$url = 'http://api.edudip.com/'.$proxyTargetValue;
 
foreach ($_POST as $key => $value) {
    $postDataToSend[$key] = $value;
}
 
$getDataToSend = array();
foreach ($_GET as $key => $value) {
    $getDataToSend[$key] = $value;
}
 
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url.'?'.http_build_query($getDataToSend)));
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postDataToSend);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec($ch);
curl_close($ch);
 
echo $res;

 

edudipproxy.php

The function of this file is described here. You must add the link to this URL in your API settings on www.edudip.com here.

 

lccs.php

Our room requires this file to enable the ScreenSharing, a sample implementation see below. This file must be in the same folder as the file of the room implementation.

$url = 'http://api.edudip.com/api2.php';
 
$postDataToSend = array(
    'api-Key' => 'EDUDIP_API_KEY',
);
foreach ($_POST as $key => $value) {
    $postDataToSend[$key] = $value;
}
 
$getDataToSend = array();
foreach ($_GET as $key => $value) {
    $getDataToSend[$key] = $value;
}
 
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . implode('&amp;', $getDataToSend));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postDataToSend);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec($ch);
curl_close($ch);
 
echo $res;

Durch die weitere Nutzung der Seite stimmst du der Verwendung von Cookies zu. Weitere Informationen

Die Cookie-Einstellungen auf dieser Website sind auf "Cookies zulassen" eingestellt, um das beste Surferlebnis zu ermöglichen. Wenn du diese Website ohne Änderung der Cookie-Einstellungen verwendest oder auf "Akzeptieren" klickst, erklärst du sich damit einverstanden.

Schließen