Hi,
My APE server works just fine and I already performed a few tests.
Now I'm trying to contact the APE server thru a simple HTTP request in
my PHP script.
On server side, I don't include the inlinepush.js script, but my
custom javascript code:
Ape.registerCmd("foo", false, function(params, infos) {
return { name: "bar", data: {time: new Date().getTime()} };
});
Based on the sample code in the official docs, I have something like
that for the PHP part:
<?
$url = 'http://2.ape.mysub.domain.net:6969/';
$cmd = array(array('cmd' => 'foo',
'chl' => '1',
'params' => array(
'param1' => 'value1',
'param2' =>
'value2',
'data' => array
('content' => 'Heyyyy')
)
)
);
$data = file_get_contents($url . urlencode(json_encode($cmd)));
echo("<h3>request:</h3>'".$url.urlencode(json_encode($cmd))."'<br/
>" );
echo("<h3>response:</h3>'".$data."'");
?>
But when I try to execute the PHP code above, the APE server's answer
is "APE SERVER No command given.".
Any idea ?
Many thanks in advance.
--
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/