Thanks,  I will go this way then if command line access is not planned
for APE, password still seems better than IP filter.

Cadrach

On Jan 2, 1:34 pm, cedric <[email protected]> wrote:
> I don't think you can use command line to communicate directly with
> APE however you can protect all calls made by php with a password.
>
> There is an example on how to do in ape-jsf/Demos/Controller/
> test.php :
>
> $APEserver = 'xxxxx:6969/?';
> $APEPassword = 'testpasswd';
> ...
> $cmd = array(array(
>   'cmd' => 'inlinepush',
>   'params' =>  array(
>           'password'  => $APEPassword,
>           'raw'       => 'postmsg',
>           'channel'   => 'testChannel',
>           'data'      => array( //Note: data can't be a string
>               'message' => $messages[array_rand($messages)]
>           )
>    )
> ));
> ...
>
> All you have to do is to change 'testpasswd' by your password and also
> edit file inlinepush.conf to set your password there.
> You can also try using "localhost:6969/?" as $APEserver in the php
> script so it stays on your server.
>
> On 31 déc 2009, 16:37, Cadrach <[email protected]> wrote:
>
> > Hi everyone,
>
> > I have setup my APE app (chat system based on a mysql DB), and now I
> > would like for my PHP application to communicate through APE with the
> > users connected, to send server messages for example, or to send JS
> > scripts to execute (a user modifying her page could lead to a page
> > update for another user-).
>
> > PHP & APE resides on the same server.
>
> > I already know I could do this using cURL, but:
> > - Protecting the commands reserved to the server using IP filter is
> > not very good
> > - Having an external call when everything is on the same server seems
> > sub-optimal
>
> > What I would like to know is:
> > - Can PHP (or something else) directly send commands to APE using the
> > command line?
> > - If not, what would be the best way to "protect" commands from being
> > executed by an external user?
>
> > Thanks a lot for reading, and thanks a lot more for this great tool :)
>
> > Cadrach

-- 
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/

Reply via email to