On 6/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > On 6/28/07, John Mettraux <[EMAIL PROTECTED]> wrote: > > > > On 6/28/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > > > > The current php bridge is based on REST, actually I do not know REST, is > it > > > also possible to build a php bridge based on CURL? > > > > Well, I think so. CURL is a PHP library wrapper around the CURL tool, is > it? > > > > GET/POST documents are you're done. REST is just the GET/POST HTTP > > model not just for browsers. You can use RESTful services via CURL. > > > I started with cURL, but I already lost hours with the following code. I > just want to login and then show the stores. Do you have any idea what is > wrong here? > > $sessions = curl_init(); > curl_setopt($sessions, > CURLOPT_URL,"http://localhost:7080/webclient/pages/login.jsp"); > curl_setopt($sessions, CURLOPT_POST, 1); > curl_setopt($sessions, CURLOPT_POSTFIELDS, > 'username=alice&password=alice&submit=login');
> "http://localhost:7080/webclient/stores.action"); > echo curl_exec($sessions); Hi Mike, OK, first, this is the OpenWFEru users mailing list and not the OpenWFE one. But I'll answer anyway. The OpenWFE mailing list is at : http://groups.google.com/group/openwfe-users Second, you're using curl against the regular OpenWFE WEB interface and not against the REST interface. As you are versed into PHP, why don't you simply take a look at how openwfe-php does it ? Like all the other REST client libraries it binds to the REST interface of OpenWFE (and not the the regular web user interface). CURL is just a library for getting web content via HTTP, it's perfectly OK to use it to grab content that is regular web pages and it's OK as well for grabbing content delivered in the REST style. You cannot say "is it OK to use CURL instead of REST ?", it's like saying "is it OK to use the red car instead of the highway ?". So the REST interface to OpenWFEja is at http://localhost:5080/ I hope this helps, best regards, -- John Mettraux -///- http://jmettraux.openwfe.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "OpenWFEru users" 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/openwferu-users?hl=en -~----------~----~----~----~------~----~------~--~---
