Tim, Yeah,your suggestion is really great. I just try to access server's log...REALbasic function works well either (socket)POST or (socket)GET method
Socket1.POST "http://getvar.php?"+Socket1.EncodeFormData(data) But I also need to execute webbrowser.. as well //Call webbrowser (this should be GET) //ShowURL "http://getvar.php?"+Socket1.EncodeFormData(data) So the only way I can do is to use GET,but it's very very weak way. Any idea to use POST ? Thanks, Warachet -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Murphy Sent: Monday, March 20, 2006 5:40 PM To: REALbasic NUG Subject: Re: Can anyone suggest me how to POST variable to PHP? Check this link here for an example post script. http://www.resexcellence.com/realbasic/articles/2004/09-25-04/ Does it work when you go http instead of https? Do you have access to the log on the server, showing what the post actually came out like? Can you go Get by any chance? For gets specifically, I know this is low tech, but I still post data by building up the URL manually like: url = "http://server.com/get.php?&user=" + user + "&val2"... I know it's not post, but hope it helps. Good luk, On Mar 20, 2006, at 5:20 AM, Warachet Samtalee (AP-SDT) wrote: > I've tried to used to POST data (that's username&password) > > from REALbasic to PHP (login page) and submit that value > > ,but it seems does not work well.What more suitable way should I use? > > > > // Dim socket1 as new HTTPSocket > > //dim data as new dictionary > > //data.value("action")="submit" > > /data.value("usrid")="username" > > //data.value("passwd")="password" > > > > // setup the socket to POST the form > > //socket1.setFormData data > > //socket1.post > "https://ip_address/apache2-default/PHP_Scripts/login.php" > > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives of this list here: > <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
