这是以text / xml发送数据的帖子通知。获取发布的xml没有问题,但如何获取X-Security-Data
和X-Security-Hash
的值?
我习惯使用$ _POST和$ _GET,但在这种情况下我使用$xml_post = trim(file_get_contents('php://input'));
来获取xml ......其他两个值怎么样?
X-Security-Data:1409261330848SEN140826-7569-89111S
X-Security-Hash:c063d68a6112dbc15e3eccf4943879b0
User-Agent:FS
Content-Length:584
Content-Type:text/xml; charset=UTF-8
Host:www.test.com
<subscription >
<enddate></enddate>
<nextperioddate>2015-08-26T00:00:00+0000</nextperioddate>
<periodcount>1</periodcount>
<test>true</test>
<quantity>10</quantity>
<reference>some reference</reference>
<customerurl>some url</customerurl>
<customer>
<fname>some name</fname>
<lname>some name</lname>
<company>some company</company>
<phone>11112223333</phone>
<email>test@test.com</email>
</customer>
</subscription>