php - Replace nuSOAP with cURL -
php - Replace nuSOAP with cURL -
i have php script syncs info 3rd party service, , to, if possible, replace nusoap curl have heard curl faster. web service calling takes simple http post , returns it, curl parameters shouldn't involved.
i need pass 4 things, user id, password, organization id, , name of web service receive info from.
which part of curl options pass them? trying pass them in header, not sure if correct. kept receiving 'bad request (invalid number)' error.
edit: setting httpheader looks still setting text/html.
since, have thought have basic understanding of curl. giving shallow information.
if posting info page create utilize of
curl_setopt($agent, curlopt_post, true); curl_setopt($agent, curlopt_postfields, $post_data);
where $post_data
info post page , like
$post_data="name=stanley&feedback=good";
or
if trying create authentication page, use
curl_setopt($ch, curlopt_httpauth, curlauth_basic); curl_setopt(curlopt_userpwd, '[username]:[password]');
php curl nusoap
Comments
Post a Comment