PHP demonstration script
<?php
/**
* Alma Career Demonstration PHP script for downloading XML exports from Teamio
*
*/
/**
* Settings part, modify as necessary...
*/
$auth = array( 'login' => 'test', 'password' => '123456', 'url' => 'ie/positions');
$lXmlFile = 'https://g2.lmc.cz/export/' . $auth['url'] . '?login='.$auth['login'].'&password='.$auth['password'].'&type=1';
/**
* Working part, do not modify it...
*/
$lHttpGetFile = "";
if (!$lReq = curl_init($lXmlFile)) die("Not able to connect to: " . $lXmlFile);
curl_setopt($lReq, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($lReq, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($lReq, CURLOPT_FAILONERROR, TRUE);
$lResult = curl_exec($lReq);
if ($lResult) die("Successfuly downloaded!\n " . $lResult);
else die("server error: Not able to send data to: " . $lXmlFile . " , error message: " . curl_error($lReq));
curl_close($lReq);
?>Last updated on