CURL XML Request [From C to PHP]


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I need some help converting this into something that will work with PHP.

Code: #!/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/&/&amp;/g'
-e 's/</&lt;/g'
-e 's/>/&gt;/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

152 Like 52 Dislike
Previous php-forum Next php-forum
Other php-forum

losing variables between php brackets
Hi

have got this code:
Code: $id=mysql_result($result,0,"itemid");
$title=mys

SMTP server...
I recently found a tutorial online on SMTP authentification for sending emails from webpages, here i

array empty
Hiya peeps,

Ok here is the codes.

order.php

Code:

Time script, set to my time zone?
I am using this line to get the date and time

Code: $time = date(F." ".d.", &q

single page with referrer to show correct page
I have a simple website with a couple of different pages. I would like to be able to in a div tag w

Paypal
Hi all,

I have an advanced basic knowledge of php

I want to try something new for a s

Slashes
Have a small problem and I'm not able to understand why I'm getting the results I'm getting... and i

Parse String
I need to parse the string below into three variables. How would I do that?

john + 10/20/2008

Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand,

PRotect my POST DATA... FROM HTML ATTACKS
I need to like let's say

If a user submit's his Prayer and he put's <meta refresh stuf

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash