This is my code for that:
function send_command_to_APE($cmd)
{
//echo ($_SESSION['apeConfigServer']);
//$_SESSION['apeConfigServer']="ape.branch.ape-project.org:80";
$APEserver = "http://".$_SESSION['apeConfigServer']."/?";
$context= stream_context_create(array(
'http' => array(
'timeout' => 5
)
)
);
//print_r ($cmd);
//die();
//echo(json_encode($cmd));
//die();
$data =
@file_get_contents($APEserver.rawurlencode(json_encode($cmd)),0, $context);
//echo $data;
//echo ("<p>".$APEserver.rawurlencode(json_encode($cmd)));
//die("<p> ".$data);
$data = json_decode($data);
//print_r($data);
//die("----");
return $data;
}
>From memory, the command on the server needs to have false as parameter to
allow for a non-logged user to act on it.
Hope this helps.
--
--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/
---
You received this message because you are subscribed to the Google Groups "APE
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.