php-general Digest 9 May 2012 07:03:47 -0000 Issue 7806

2012-05-09 Thread php-general-digest-help

php-general Digest 9 May 2012 07:03:47 - Issue 7806

Topics (messages 317824 through 317828):

Re: How to send XML requests from PHP?
317824 by: Jim Lucas
317825 by: Matijn Woudt
317826 by: Michelle Konzack
317827 by: Jim Lucas
317828 by: marco.behnke.biz

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---

On 05/08/2012 10:50 AM, Michelle Konzack wrote:

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;
   typePERS/type
   sexMALE/sex
   first-nameOtto/first-name
   last-nameNormalverbraucher/last-name
   organisationAcme Gmbh/organisation
   streetMain Strasse/street
   number13/number
   postcode55/postcode
   cityNewe Stad/city
   countryDE/country
   phone+040.0123456789/phone
   fax+040.0123456789/fax
   emailh...@nictest.de/email
   passwordnew_secret/password
/request


RESPONSE:

response1 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



Look into cURL http://php.net/curl


--
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/
http://www.bendsource.com/
---End Message---
---BeginMessage---
On Tue, May 8, 2012 at 7:50 PM, Michelle Konzack
linux4miche...@tamay-dogan.net wrote:
 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;
  typePERS/type
  sexMALE/sex
  first-nameOtto/first-name
  last-nameNormalverbraucher/last-name
  organisationAcme Gmbh/organisation
  streetMain Strasse/street
  number13/number
  postcode55/postcode
  cityNewe Stad/city
  countryDE/country
  phone+040.0123456789/phone
  fax+040.0123456789/fax
  emailh...@nictest.de/email
  passwordnew_secret/password
 /request


 RESPONSE:

 response1 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


Try one of the available XML classes that are included in PHP [1].
Both XMLWriter [2] and SimpleXML [3] will do the job.

- Matijn

[1] www.php.net/XML
[2] www.php.net/XMLWriter
[3] www.php.net/SimpleXML
---End Message---
---BeginMessage---
Hello Jim Lucas,

Am 2012-05-08 11:08:13, hacktest Du folgendes herunter:
 Look into cURL http://php.net/curl

I know curl but I do not know, HOW to send the XML stuff.

The XML code is generated using a temp file for logging, which  mean,  I
can see any changes on the system...

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  linux4miche...@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/


signature.pgp
Description: Digital signature
---End Message---
---BeginMessage---

On 05/08/2012 11:25 AM, Michelle Konzack wrote:

Hello Jim Lucas,

Am 2012-05-08 11:08:13, hacktest Du folgendes herunter:

Look into cURL http://php.net/curl


I know curl but I do not know, HOW to send the XML stuff.

The XML code is generated using a temp file for logging, which  mean,  I
can see any changes on the system...

Thanks, Greetings and nice 

Re: [PHP] Re: How to send XML requests from PHP?

2012-05-09 Thread ma...@behnke.biz


Michelle Konzack linux4miche...@tamay-dogan.net hat am 8. Mai 2012 um
20:25 geschrieben:

 Hello Jim Lucas,

 Am 2012-05-08 11:08:13, hacktest Du folgendes herunter:
  Look into cURL http://php.net/curl

 I know curl but I do not know, HOW to send the XML stuff.

$ch  =  curl_init ();
curl_setopt ( $ch ,  CURLOPT_URL ,  http://www.example.com/; );


Look at http://de.php.net/manual/en/function.curl-setopt.php and set all
other options you need
- post method i guess
- post body with your xml
- 



curl_exec ( $ch );
curl_close ( $ch );


I you have build up you try and have some code, come back to the list and
tell us what didn't work and what you expect it to do. Then we can help
you. Do have a documentation how the request should look like? Headers to
be sent? Post/Get Parameters? Protocol?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php