How to send XML requests from PHP?
| From: | Michelle Konzack | Date: | Tue, 08 May 2012 17:50:21 +0000 |
| Subject: | How to send XML requests from PHP? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-317823@lists.php.net to get a copy of this message | ||
Hello *,
I have to implement an interface which must access a Domain-Registration
API. From the manual I have for example:
----8<------------------------------------------------------------------
Example 2.8. Contact Update:valid(change password)
Change password from multipass to green
REQUEST:
Generic Operation: POST(http://backend.example.com/bdom/contact/update/DOJOB0001/1/,xml)
Where xml:
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<type>PERS</type>
<sex>MALE</sex>
<first-name>Otto</first-name>
<last-name>Normalverbraucher</last-name>
<organisation>Acme Gmbh</organisation>
<street>Main Strasse</street>
<number>13</number>
<postcode>555555</postcode>
<city>Newe Stad</city>
<country>DE</country>
<phone>+040.0123456789</phone>
<fax>+040.0123456789</fax>
<email>hans@nictest.de</email>
<password>new_secret</password>
</request>
RESPONSE:
<response>1 updated</response>
----8<------------------------------------------------------------------
The problem is (I am sitting on my line) that I do not understand how
to send this XML stuff.
Any hints please?
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
Internet Service Provider, Cloud Computing
<http://www.itsystems.tamay-dogan.net/>
itsystems@tdnet Jabber linux4michelle@jabber.ccc.de
Owner Michelle Konzack
Gewerbe Strasse 3 Tel office: +49-176-86004575
77694 Kehl Tel mobil: +49-177-9351947
Germany Tel mobil: +33-6-61925193 (France)
USt-ID: DE 278 049 239
Linux-User #280138 with the Linux Counter, http://counter.li.org/