Joey1 Posted November 10, 2009 Share Posted November 10, 2009 Hi, I need some help converting this into something that will work with PHP. #!/bin/sh #URL="https://www.site.com/webservices/Affiliates/affiliates.cfc" URL="https://www.site.com/webservices/partners/products.cfc" XMLFILE=tmp_xml.xml cat <<DONE | sed -e 's/\&/\&/g' \ -e 's/</\</g' \ -e 's/>/\>/g' \ > ${XMLFILE}.encoded <?xml version="1.0" encoding="UTF-8"?> <services user="USER" password="PASS"> <company> <request> <type>Products</type> </request> </company> </services> DONE #curl -v -d @- "${URL}" -H 'SOAPAction: AffiliatesAPI' <<DONE curl --trace trace.txt -d @- "${URL}" -H 'SOAPAction: AffiliatesAPI' <<DONE <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <Request> <xmlString>`cat ${XMLFILE}.encoded`</xmlString> </Request> </soap:Body> </soap:Envelope> DONE Cheers Link to comment https://forums.phpfreaks.com/topic/180980-curl-xml-request-from-c-to-php/ Share on other sites More sharing options...
Joey1 Posted November 12, 2009 Author Share Posted November 12, 2009 Hmm... This one has me stumped Link to comment https://forums.phpfreaks.com/topic/180980-curl-xml-request-from-c-to-php/#findComment-956157 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.