假如我要调用
https://api.securefreedom.com/nuriche/Webservice/OnlineAPI.asmx?op=CheckEmail
用户名与密码为xxx.
我看了看,这个api的request的格式为POST /nuriche/Webservice/OnlineAPI.asmx HTTP/1.1
Host: api.securefreedom.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<CheckEmail xmlns="http://www.securefreedom.com/">
<Credentials>
<Username>string</Username>
<Password>string</Password>
</Credentials>
<Email>string</Email>
<Type>int</Type>
<ExcludeRepNumber>string</ExcludeRepNumber>
<ExcludeCustomerNumber>string</ExcludeCustomerNumber>
</CheckEmail>
</soap12:Body>
</soap12:Envelope>求如何发送$ch = curl_init ();
curl_setopt ( $ch, CURLOPT_URL, "https://api.securefreedom.com/nuriche/Webservice/OnlineAPI.asmx?op=CheckEmail" );
curl_setopt ( $ch, CURLOPT_HEADER, false );
curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, true );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, 这个地方需要拼数据?);
curl_setopt ( $ch, CURLOPT_HTTPHEADER, 如何放验证信息)//
$response = curl_exec ( $ch );
curl_close ( $ch );
echo $response;
https://api.securefreedom.com/nuriche/Webservice/OnlineAPI.asmx?op=CheckEmail
用户名与密码为xxx.
我看了看,这个api的request的格式为POST /nuriche/Webservice/OnlineAPI.asmx HTTP/1.1
Host: api.securefreedom.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<CheckEmail xmlns="http://www.securefreedom.com/">
<Credentials>
<Username>string</Username>
<Password>string</Password>
</Credentials>
<Email>string</Email>
<Type>int</Type>
<ExcludeRepNumber>string</ExcludeRepNumber>
<ExcludeCustomerNumber>string</ExcludeCustomerNumber>
</CheckEmail>
</soap12:Body>
</soap12:Envelope>求如何发送$ch = curl_init ();
curl_setopt ( $ch, CURLOPT_URL, "https://api.securefreedom.com/nuriche/Webservice/OnlineAPI.asmx?op=CheckEmail" );
curl_setopt ( $ch, CURLOPT_HEADER, false );
curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, true );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, 这个地方需要拼数据?);
curl_setopt ( $ch, CURLOPT_HTTPHEADER, 如何放验证信息)//
$response = curl_exec ( $ch );
curl_close ( $ch );
echo $response;
解决方案 »
- PHP如何向.NET接口webservice发送xml请求
- js && html
- phpexcel如何追加方式导出xls?急急急~~~
- 谁有比较安全的 强大一点的购物车类 发一下共享一下可以吗
- php连接mysql
- 关于一个phplib使用的设想,请教各位,谢谢
- 告别的年代--->我终于解脱了~~
- 时间转换的问题:
- 为什么我的Web程序在服务器端运行速度很慢,在客户端反而快些?
- PHP判断提交的答案是否与数据库中的正确答案相同(新手一个,这个问题已经琢磨几天,望路过的大神帮忙,谢。)
- file_get_contents采集页面,收到http 302是为什么?
- 哪位前辈能给小弟解释一下这个Ucenter的函数?
$client->SomeFunction($a, $b, $c);$client->__soapCall("SomeFunction", array($a, $b, $c));
$client->__soapCall("SomeFunction", array($a, $b, $c), NULL,
new SoapHeader(), $output_headers);
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/"));
$client->SomeFunction($a, $b, $c);
$client->__soapCall("SomeFunction", array($a, $b, $c));
$client->__soapCall("SomeFunction", array($a, $b, $c),
array('soapaction' => 'some_action',
'uri' => 'some_uri'));
?>