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');


curl_setopt($sessions, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($sessions, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($sessions, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($sessions, CURLOPT_HEADER , 1);
curl_setopt($sessions, CURLOPT_RETURNTRANSFER, 1);
curl_exec($sessions);


curl_setopt($sessions, CURLOPT_URL, "
http://localhost:7080/webclient/stores.action";);
echo curl_exec($sessions);



--

Thanks very much for any hint.

Mike

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to