I found this when i was reading about REST...<br><br><a href="http://naeblis.cx/rtomayko/2004/12/12/rest-to-my-wife">http://naeblis.cx/rtomayko/2004/12/12/rest-to-my-wife</a><br><br>Maybe you want to explain it to your wife... :)
<br><br>Best Regards<br>Joao Oliveira.<br><br><div><span class="gmail_quote">On 2/28/06, <b class="gmail_sendername">Sergio A. Kessler</b> <<a href="mailto:sergiokessler@gmail.com">sergiokessler@gmail.com</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">like, look in<br><br><a href="http://developer.yahoo.net/php/">http://developer.yahoo.net/php/
</a><br><br>there are various code samples there...<br><br>basically you don't need a specialized library, good old<br>file_get_contents is your friend ;-)<br>(or you can use the curl extension)<br><br>I'm imagining something like:
<br><br>exporting:<br><a href="http://www.domain.com/api/index.php?action=export_clients&output=csv">www.domain.com/api/index.php?action=export_clients&output=csv</a><br>or<br><a href="http://www.domain.com/api/index.php?action=export_clients&output=xml">
www.domain.com/api/index.php?action=export_clients&output=xml</a><br><br>importing:<br><a href="http://www.domain.com/api/index.php?action=import_client">www.domain.com/api/index.php?action=import_client</a><br><br>this last call should be made by a POST action, passing in the data,
<br>can be made by a simple php script, something like<br><br> foreach line in the source csv_file<br> {<br> $postargs = <fill with the client's data><br><br> // Get the curl session object<br> $session = curl_init($request);
<br><br> // Set the POST options.<br> curl_setopt ($session, CURLOPT_POST, true);<br> curl_setopt ($session, CURLOPT_POSTFIELDS, $postargs);<br> curl_setopt($session, CURLOPT_HEADER, true);<br> curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
<br><br> // Do the POST and then close the session<br> $response = curl_exec($session);<br> curl_close($session);<br><br><br>of course, the folder "api" should be protected wrt security.<br><br>/sak<br>
<br><br>On 2/28/06, Mike Fedyk <<a href="mailto:mfedyk@mikefedyk.com">mfedyk@mikefedyk.com</a>> wrote:<br>> Sergio A. Kessler wrote:<br>><br>> >On 2/27/06, Mike Fedyk <<a href="mailto:mfedyk@mikefedyk.com">
mfedyk@mikefedyk.com</a>> wrote:<br>> ><br>> ><br>> >>The focus of the question is how to get data in and out of vtiger using<br>> >>public interfaces from another automated system. I would like to renew
<br>> >>that question. Is SOAP the only and/or best answer in this area?<br>> >><br>> >><br>> ><br>> >nop.<br>> >SOAP is a complex beast that must die.<br>> ><br>> >you can use REST (web services done right).
<br>> ><br>> >just like yahoo does with php:<br>> ><br>> ><a href="http://developer.yahoo.net/php/">http://developer.yahoo.net/php/</a><br>> ><a href="http://developer.yahoo.net/php/howto-reqRestPhp.html">
http://developer.yahoo.net/php/howto-reqRestPhp.html</a><br>> ><br>> >note that with "output" parameter you can control what you get, ie.<br>> >CSV, XML, txt, whatever.<br>> ><br>> >
<br>> Have any links to php libraries for REST? I'm reading through the<br>> various articles in Wikipedia right now...<br><br>_______________________________________________<br>This <a href="http://vtiger.com">vtiger.com
</a> 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!<br><a href="http://zohowriter.com/?vt">
http://zohowriter.com/?vt</a><br></blockquote></div><br>