https://wiki.webmoney.ru/wiki/show/%D0%98%D...D0%B9%D1%81+X11
вот как я это поручаю:
$ch = curl_init();
$data = "
<request>
<wmid></wmid>
<passportwmid>12-ти значный WMID</passportwmid>
<sign></sign>
<params>
<dict>1</dict>
<info>1</info>
<mode>0</mode>
</params>
</request>";
curl_setopt($ch, CURLOPT_URL, 'https://passport.webmoney.ru/asp/XMLGetWMPassport.asp');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
//curl_exec($ch);
echo "<pre>";
print_r(curl_getinfo($ch));
curl_close($ch);
Должно на выходе получится много данных типа:
<?xml version="1.0" encoding="windows-1251"?>
<response retval="">
<fullaccess></fullaccess>
<certinfo wmid="">
<attestat>
<row cid="" regcid="" tid="" locked="" admlocked="" recalled="" datecrt="" datediff="" regnickname="" regwmid=""/>
</attestat>
<wmids>
<row wmid="" info="" nickname="" datereg="" yearreg="" monthreg="" dayreg="" timereg="" ctype="" companyname="" companyid="" phone="" email="" phone-check-lock="" email-check-lock=""/>
</wmids>
<userinfo>
<value>
<row ctype="" jstatus="" osnovainfo="" locked="" nickname="" infoopen="" city="" region="" citid="" countryid="" country="" zipcode="" adres="" fname="" iname="" oname="" pnomer="" pdate="" pday="" pmonth="" pyear="" pdateMMDDYYYY="" pcountryid="" pcountry="" pcity="" pbywhom="" rcountryid="" rcountry="" rcity="" radres="" bplace="" bday="" bmonth="" byear="" name="" dirfio="" buhfio="" inn="" okpo="" okonx="" jadres="" jcountry="" jcountryid="" jcity="" jzipcode="" bankname="" bik="" ks="" rs="" phonehome="" phonemobile="" icq="" fax="" phone="" email="" web="" cap_owner="" pasdoc="" inndoc="" jabberid="" sex=""/>
</value>
<check-lock>
<row ctype="" jstatus="" osnovainfo="" nickname="" infoopen="" city="" region="" country="" adres="" zipcode="" fname="" iname="" oname="" pnomer="" pdate="" pbywhom="" pcountry="" pcity="" rcountry="" rcity="" radres="" bplace="" bday="" inn="" name="" dirfio="" buhfio="" okpo="" okonx="" jadres="" jcountry="" jcity="" jzipcode="" bankname="" bik="" ks="" rs="" fax="" email="" web="" phone="" phonehome="" phonemobile="" icq="" jabberid="" sex=""/>
</check-lock>
<weblist>
<row url="" check-lock="" ischeck="" islock=""/>
</weblist>
<extendeddata>
<row type="" account="" check-lock=""/>
</extendeddata>
</userinfo>
</certinfo>
</response>
А в результате пришло только вот что:
Array
(
[url] => https://passport.webmoney.ru/asp/XMLGetWMPassport.asp
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => 0
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => -1
[starttransfer_time] => 0
[redirect_time] => 0
[certinfo] => Array
(
)
)
В связи с этим два вопроса:
1. Как получить все данные?
2. Можно ли тут использовать (и как) для упрощения функцию: simplexml_load_file ?
_____________
Live in new format =)