[Vtigercrm-developers] Receiving data from outside sources
Joao Oliveira
joaopcoliveira at gmail.com
Wed Mar 1 10:58:07 PST 2006
I found this when i was reading about REST...
http://naeblis.cx/rtomayko/2004/12/12/rest-to-my-wife
Maybe you want to explain it to your wife... :)
Best Regards
Joao Oliveira.
On 2/28/06, Sergio A. Kessler <sergiokessler at gmail.com> wrote:
>
> like, look in
>
> http://developer.yahoo.net/php/
>
> there are various code samples there...
>
> basically you don't need a specialized library, good old
> file_get_contents is your friend ;-)
> (or you can use the curl extension)
>
> I'm imagining something like:
>
> exporting:
> www.domain.com/api/index.php?action=export_clients&output=csv
> or
> www.domain.com/api/index.php?action=export_clients&output=xml
>
> importing:
> www.domain.com/api/index.php?action=import_client
>
> this last call should be made by a POST action, passing in the data,
> can be made by a simple php script, something like
>
> foreach line in the source csv_file
> {
> $postargs = <fill with the client's data>
>
> // Get the curl session object
> $session = curl_init($request);
>
> // Set the POST options.
> curl_setopt ($session, CURLOPT_POST, true);
> curl_setopt ($session, CURLOPT_POSTFIELDS, $postargs);
> curl_setopt($session, CURLOPT_HEADER, true);
> curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
>
> // Do the POST and then close the session
> $response = curl_exec($session);
> curl_close($session);
>
>
> of course, the folder "api" should be protected wrt security.
>
> /sak
>
>
> On 2/28/06, Mike Fedyk <mfedyk at mikefedyk.com> wrote:
> > Sergio A. Kessler wrote:
> >
> > >On 2/27/06, Mike Fedyk <mfedyk at mikefedyk.com> wrote:
> > >
> > >
> > >>The focus of the question is how to get data in and out of vtiger
> using
> > >>public interfaces from another automated system. I would like to
> renew
> > >>that question. Is SOAP the only and/or best answer in this area?
> > >>
> > >>
> > >
> > >nop.
> > >SOAP is a complex beast that must die.
> > >
> > >you can use REST (web services done right).
> > >
> > >just like yahoo does with php:
> > >
> > >http://developer.yahoo.net/php/
> > >http://developer.yahoo.net/php/howto-reqRestPhp.html
> > >
> > >note that with "output" parameter you can control what you get, ie.
> > >CSV, XML, txt, whatever.
> > >
> > >
> > Have any links to php libraries for REST? I'm reading through the
> > various articles in Wikipedia right now...
>
> _______________________________________________
> This vtiger.com email is sponsored by: Zoho Writer. Are you still using
> your desktop word processor for typing documents? Try the AJAX enabled,
> collaboration-friendly online word processor, Zoho Writer for FREE instead!
> http://zohowriter.com/?vt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20060301/b0681a33/attachment-0003.html
More information about the vtigercrm-developers
mailing list