Hi, 2012/4/17 ecommy <bstdevelopm...@gmail.com> > > > Also I still didn't realize how to secure everything so an external user > can not join the channel to get sensitive data if he knows the > username/userid for instance. > > You can set a password for your "secure" channel ( in server side : like the inline push example), every client if want join must knows the password of the channel! and for send a inlinepush to user you must know the "pubid" of the usera and send the inlinepush cmd to the servera and the server retrive the user from the pubid ( http://www.ape-project.org/docs/server/users/getUserByPubid.html) to send the push!
sorry for my bad english! bye :) > Thank you very very much! > > On Wednesday, February 1, 2012 1:08:22 PM UTC+2, giumast wrote: >> >> I used that method, xosofox, and i have to admin that your blog post >> was amazing. I now have a better understanding of how APE works, many >> thanks. >> >> What i do is calling an inlinepush with an ape-server custom command, >> create a unipipe with a user (i read the users pubid using the >> hashlist you've implemented), and send custom commands either to >> sender and receiver. It works! >> >> On 31 Gen, 20:36, Xosofox <xoso...@googlemail.com> wrote: >> > If you implement your own user handling, you don't need to create all >> > the channels. >> > You could just hook on the login and save the user pipe yourself. >> > I blogged about that some time ago:http://www.xosofox.de/** >> 2010/10/ape-user-handling/<http://www.xosofox.de/2010/10/ape-user-handling/> >> > >> > On 31 Jan., 10:07, apocalys <i...@ewhere.org> wrote: >> > >> > >> > >> > >> > >> > >> > >> > > yes >> > >> > > On 25 Gen, 13:14, Louis Charette <charette.lo...@gmail.com> wrote: >> > >> > > > Glad I could help. >> > >> > > > Do you still use the "one channel per user" technique? >> > >> > > > Envoyé de mon iPhone >> > >> > > > Le 2012-01-25 à 06:52, apocalys <i...@ewhere.org> a écrit : >> > >> > > > > i solved my problem... cause was website bad manage PHP session. >> > >> > > > > On 25 Gen, 11:52, apocalys <i...@ewhere.org> wrote: >> > > > >> tkx to anwsered me... >> > >> > > > >> i followed first method, one channel for user, but when a new >> user >> > > > >> login into website and join into his channel (named apeUser## >> where >> > > > >> '##' is userId) also all other user join into this channel and >> when i >> > > > >> send an inlinepush data, all user received this. >> > >> > > > >> Here my JS code: >> > >> > > > >> var client = new APE.Client(); >> > > > >> //1) Load APE Core >> > > > >> client.load({ >> > > > >> identifier: 'appName', >> > > > >> channel: 'apeuser'+userId >> > > > >> }); >> > >> > > > >> Here my PHP code: >> > >> > > > >> $cmd = array(array( >> > > > >> 'cmd' => 'inlinepush', >> > > > >> 'params' => array( >> > > > >> 'password' => $APEPassword, >> > > > >> 'raw' => 'postmsg', >> > > > >> 'channel'=> 'apeuser'.$userIdToNotify, >> > > > >> 'data' => array( >> > > > >> 'message' => $messages[0] >> > > > >> ) >> > > > >> ) >> > > > >> )); >> > >> > > > >> where i wrong? >> > >> > > > >> Tkx a lot. >> > > > >> On 24 Gen, 19:31, Louis Charette <charette.lo...@gmail.com> >> wrote: >> > >> > > > >>> Hi and welcome to APE, >> > >> > > > >>> Your PHP code looks ok, but I think Inlinepush just push the >> "data" to everyone in the channel by default. To send to only one person at >> a time, there's two way to do that: >> > >> > > > >>> - Put everyone in different channel and send to the right >> channel with inlinepush >> > > > >>> - Create your own server-side command based on inlinepush. >> > >> > > > >>> The first one would be easier to do if you don't need anything >> else from APE. The second one, you'll need to know the user pubid. >> Something like this should work (but I didn't tested it). >> > >> > > > >>>> Ape.registerCmd("**inlinepushuser", false, function(params, >> infos) { >> > > > >>>> if (params.password == Ape.config("inlinepush.conf", >> "password")) { >> > >> > > > >>>> if ($defined(params.data)) { >> > >> > > > >>>> //Get user object >> > > > >>>> var thisUser = >> > > > >>>> Ape.getUserByPubid(params.**data.pubid); >> >> > >> > > > >>>> //Send on this user raw >> > > > >>>> thisUser.pipe.sendRaw("**inlinepushuser", >> {"message": params.data.message}); >> > >> > > > >>>> return >> > > > >>>> {"name":"pushed","data":{"**value":"ok"}}; >> >> > > > >>>> } else { >> > > > >>>> return 0; >> > > > >>>> } >> > > > >>>> } else { >> > > > >>>> return ["400", "BAD_PASSWORD"]; >> > > > >>>> } >> > >> > > > >>>> }); >> > >> > > > >>> And your php code become this: >> > >> > > > >>>> $cmd = array(array( >> > > > >>>> 'cmd' => 'inlinepushuser', >> > > > >>>> 'params' => array( >> > > > >>>> 'password' => $APEPassword, >> > > > >>>> 'raw' => 'postmsg', >> > > > >>>> 'channel'=> 'testchannel', >> > > > >>>> 'pipe' => '**593bbc59403c9289e1e2728882a0f1**ea', >> >> > > > >>>> 'data' => array( //Note: data can't be a >> string >> > > > >>>> 'message' => $messages[0], >> > > > >>>> 'pubid' => $userpubid >> > > > >>>> ) >> > > > >>>> ) >> > > > >>>> )); >> > >> > > > >>> But again, putting everyone in different channel should be >> easier, depending of what you want to achieve. >> > >> > > > >>> - Louis >> > >> > > > >>> Le 2012-01-24 à 06:05, apocalys a écrit : >> > >> > > > >>>> Hi all... >> > >> > > > >>>> I new to develop in APE and I need to create a user notify >> system into >> > > > >>>> a web site. >> > > > >>>> I don't understand how to send an inlinepush data to a single >> user and >> > > > >>>> not to all. >> > >> > > > >>>> To allow this user have to join in a channel on core.start or >> not? >> > >> > > > >>>> My PHP code to send data is: >> > >> > > > >>>> $APEserver = 'http://domain:6969/?'; >> > > > >>>> $APEPassword = #psw#; >> > >> > > > >>>> $messages = array( >> > > > >>>> 'Notify' >> > > > >>>> ); >> > >> > > > >>>> $cmd = array(array( >> > > > >>>> 'cmd' => 'inlinepush', >> > > > >>>> 'params' => array( >> > > > >>>> 'password' => $APEPassword, >> > > > >>>> 'raw' => 'postmsg', >> > > > >>>> 'channel'=> 'testchannel', >> > > > >>>> 'pipe' => '**593bbc59403c9289e1e2728882a0f1**ea', >> >> > > > >>>> 'data' => array( //Note: data can't be a >> string >> > > > >>>> 'message' => $messages[0] >> > > > >>>> ) >> > > > >>>> ) >> > > > >>>> )); >> > >> > > > >>>> $data = >> > > > >>>> file_get_contents($APEserver.**rawurlencode(json_encode($cmd)* >> *)); >> > > > >>>> return var_dump(json_decode($data)); >> > >> > > > >>>> APE server tell me that message was pushed correctly but i >> can't get >> > > > >>>> it. >> > >> > > > >>>> Login into website with 2 different user I get, for all 2, the >> same >> > > > >>>> pubId... is this the problem? >> > >> > > > >>>> I have to sent inlinepush to pubId or sessionId? >> > >> > > > >>>> Tkx to all >> > >> > > > >>>> -- >> > > > >>>> You received this message because you are subscribed to the >> Google >> > > > >>>> Groups "APE Project" group. >> > > > >>>> To post to this group, send email to >> ape-project@googlegroups.com >> > > > >>>> To unsubscribe from this group, send email to >> > > > >>>> ape-project+unsubscribe@**googlegroups.com<ape-project%2bunsubscr...@googlegroups.com> >> > > > >>>> For more options, visit this group at >> > > > >>>>http://groups.google.com/**group/ape-project?hl=en<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/<http://github.com/APE-Project/> >> > >> > > > > -- >> > > > > You received this message because you are subscribed to the >> Google >> > > > > Groups "APE Project" group. >> > > > > To post to this group, send email to ape-project@googlegroups.com >> > > > > To unsubscribe from this group, send email to >> > > > > ape-project+unsubscribe@**googlegroups.com<ape-project%2bunsubscr...@googlegroups.com> >> > > > > For more options, visit this group at >> > > > >http://groups.google.com/**group/ape-project?hl=en<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/<http://github.com/APE-Project/> > > -- > You received this message because you are subscribed to the Google > Groups "APE Project" group. > To post to this group, send email to ape-project@googlegroups.com > To unsubscribe from this group, send email to > ape-project+unsubscr...@googlegroups.com > 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/ > -- ------------------------------ *Michele Vezzoli* *IT Manager* TEL: +39.030.5230600 MOB: +39.328.0555322 FAX: +39.030.5230600 SKYPE: michele.vezzoli.vardump VarDump S.r.l. - www.var-dump.it This e-mail message does not imply or cause any obligation, unless it is provided by a previous written agreement. This message is confidential: if you have received it by mistake, please advise immediately the sender by e-mail and destroy the message and its attachments. You are hereby notified that any unauthorized use of the content of this message could constitute a criminal offence. Thank you. -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to ape-project@googlegroups.com To unsubscribe from this group, send email to ape-project+unsubscr...@googlegroups.com 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/