我無法弄清楚如何有效地獲得多部分http響應的特定部分。 我試圖通過在PHPCURL上發送SOAP來從Jasper Reports服務器獲取PDF報告,並且我沒有在CURL文檔中找到如何處理多部分響應。 我想在下面獲得'報告'部分的RAW迴應。 感謝您的幫助。 伊利亞斯如何通過Content-Id獲取多部分響應的附件PHP CURL
------=_Part_6_9317140.1311257231623
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <B33D7700BFCF12CC2A64A7F6FB84CEAE
sutffs here
------=_Part_6_9317140.1311257231623
Content-Type: application/pdf
Content-Transfer-Encoding: binary
Content-Id: <**report**>
binary PDF content here
也許http://www.php.net/manual/en/function.mailparse-msg-get-part.php? –
閱讀以前的問題/答案:http://stackoverflow.com/questions/541430/how-do-i-read-any-request-header-in-php – Brian