Thursday, April 1, 2010

Re: How to pass an array trough URL??

the idea is to redistribute this to client where cake's library is not
available...

Thanks Miles J for help...

Tomas


On 1 dub, 19:15, Miles J <mileswjohn...@gmail.com> wrote:
> You should use cakes HttpSocket.
>
> http://book.cakephp.org/view/792/HttpSocket
>
> On Apr 1, 12:34 am, "toka...@gmail.com" <toka...@gmail.com> wrote:
>
> > Thanks your opinion.
>
> > regarding the POST...do you think this is ok to use??
>
> >http://php.net/manual/en/function.fsockopen.php
>
> > Thanks
> > Tomas
>
> > On 30 bře, 19:00, Miles J <mileswjohn...@gmail.com> wrote:
>
> > > It seems like this should be a POST. But besides that, it should work
> > > fine.
>
> > > On Mar 29, 11:41 pm, "toka...@gmail.com" <toka...@gmail.com> wrote:
>
> > > > I am developing a simple public API where I need receive an array of
> > > > data from other website.
>
> > > > is there better way? no difficult to implement?
>
> > > > Thanks
> > > > Tomas
>
> > > > On 29 bře, 19:02, Miles J <mileswjohn...@gmail.com> wrote:
>
> > > > > Is there a reason your passing data like this through URLs? What are
> > > > > you trying to achieve?
>
> > > > > On Mar 29, 9:04 am, "toka...@gmail.com" <toka...@gmail.com> wrote:
>
> > > > > > I have solved it. pretty simple.
>
> > > > > > examples.com/:controller/:action/?
> > > > > > names[]=John&names[]=Tomas&names[]=Susan
>
> > > > > > then just call
> > > > > > $this->params['url'] to get your array 'names'.
>
> > > > > > PS: you can also do nested arrays like names[0]
> > > > > > [email]=j...@example.com&names[1][email]=.....
>
> > > > > > Tomas
>
> > > > > > On 29 bře, 11:59, "toka...@gmail.com" <toka...@gmail.com> wrote:
>
> > > > > > > Hi, is there a chance to pass simple array via URL?
>
> > > > > > >http://example.com/name:John/name:Tom/name:Susan
>
> > > > > > > Then I should recieve back my array of names  .... array('John',
> > > > > > > 'Tom', 'Susan');
>
> > > > > > > Any idea how the URL should look like?
>
> > > > > > > Thanks
> > > > > > > Tomas

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

No comments: