Re: Does PHP have a way to pass form data to a remote script? [message #180663 is a reply to message #180653] |
Fri, 08 March 2013 09:12 |
M. Strobel
Messages: 386 Registered: December 2011
Karma:
|
Senior Member |
|
|
Am 08.03.2013 03:39, schrieb lichunshen84(at)gmail(dot)com:
> On Thursday, March 7, 2013 9:10:23 PM UTC-5, Peter H. Coffin wrote:
>> On Thu, 7 Mar 2013 17:29:34 -0800 (PST), lichunshen84(at)gmail(dot)com wrote:
>>
>>
>>
>>> Hi,
>>
>>>
>>
>>> I'm not a php programmer but my customer is using Word Press and
>>
>>> WooCommerce (I assume php is used to do the process etc.) for their
>>
>>> order processing). What we would like to do is to add a function to
>>
>>> pass the order data / form data to a remote script so that the remote
>>
>>> script can capture the form data as well, no need to get anything back
>>
>>> to the caller (the current form processor).
>>
>>>
>>
>>> Is it doable with php?
>>
>>
>>
>> Almost certainly yes. PHP support establishing network connections by
>>
>> many means.
>>
>
> Could you elaborate a bit? Even better, some sample code. Thanks.
>
Introduction
PHP supports libcurl, a library created by Daniel Stenberg, that allows you to
connect and communicate to many different types of servers with many different types
of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict,
file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP
PUT, FTP uploading (this can also be done with PHP's ftp extension), HTTP form based
upload, proxies, cookies, and user+password authentication.
These functions have been added in PHP 4.0.2.
/Str.
|
|
|