For the moment, I tried something like that.
<?php
echo 'Hello ';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"
http://192.168.1.200/web/ajax/login.login.ajax.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"user=Admin&pass=Admin");
// in real life you should use something like:
// curl_setopt($ch, CURLOPT_POSTFIELDS,
// http_build_query(array('postvar1' => 'value1')));
// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
echo $server_output;
curl_close ($ch);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"
http://192.168.1.200/web/ajax/security. ... s.ajax.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"set=ArmAway");
// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
echo $server_output;
curl_close ($ch);
echo "end";
?>
I received a OK from the connexion part, but nothing from the Arm one.
Bes regards,
Laurent