Hi, here is a sample php script in APE 1.0 to push data to inlinepush module :
$url = 'http://127.0.0.1:6969/0/?'; $cmd = array(array( 'cmd' => 'inlinepush', 'params'=> array( 'password' => 'testpasswd', 'raw' => 'foo', 'channel' => 'testchannel', 'data' => array( //Note: data can't be a string 'gros' => 'steak' ) ) )); $data = file_get_contents($url . urlencode(json_encode($cmd))); echo $data; Regards. On Tue, 10 Nov 2009 00:49:31 -0800 (PST), alex424529 <[email protected]> wrote: > http://0.ape.myserver:6969/?{"cmd":"control","params":{"password":"OOOOOOO","raw":"TEST","channel":"channelname","data":{}}} > > reply is: > > [{"time":"1257842633","raw":"ERR","data": > {"code":"002","value":"BAD_CMD"}}] > > How to use this control command? > > On 12 oct, 22:11, Anthony Catel <[email protected]> wrote: >> You have to include it in main.ape.js. >> >> And : >> >> [Module] [spidermonkey] Loading module : Javascript embeded (0.01) - >> Anthony Catel >> [JS] Main script loaded >> >> Should be displayed at the start. >> >> For a better understanding, read this > :http://www.ape-project.org/wiki/index.php/How_to_build_a_serverside_J... >> >> As you can see : >> >> Ape.getChannelByName(params.channel).pipe.sendRaw(params.raw, > params.data); >> >> > {"cmd":"control","params":{"password:"foo","raw":"YOURRAW","channel":"chann > elname","data":{}}} >> >> You can populate the "data" object with the object you want. >> >> Alex Wright a écrit : >> >> >> >> > OK. I've got the lastest now, and it has inlinepush.js now. >> >> > How do I ensure that it is loaded? Does APE load all the commands/*.js >> > files when the spidermonkey plugin is loaded? >> >> > Also, could you give us an example of the new JSON based syntax for >> > calling thecontrolcommand? >> >> > On Oct 12, 1:59 pm, Anthony Catel <[email protected]> wrote: >> >> >> Hi, >> >> >> "mod controller" is already on github. >> >> But it's not libape-controller anymore. >> >> >> Take a look at ./bin/scripts/commands/inlinepush.js >> >> >> Anthony >> >> >> John Chavarria a écrit : > > -- Nicolas Trani - R&D Web Engineer Weelya - Improve the web Tel : 04 67 169 778 http://www.weelya.com / http://www.ape-project.org -- 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/
