cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

cURL -> PHP -> XML

From: Eddy Oretap <eddy_at_owss.no>
Date: Tue, 20 Jul 2004 23:58:57 +0200

Hi ppl

I'm quite new to cURL but have used PHP for years now and I got a problem
as follows:

I have to send this as a HTTP POST using cURL in PHP:

POST /sms HTTP/1.0
Host: sms3.pswin.com
Content-type: application/xml
Content-length: 184

<?xml version="1.0"?>
<SESSION>
<CLIENT>demo1</CLIENT>
<PW>demo1</PW>
<MSGLST>
<MSG>
<ID>1</ID>
<TEXT>Test message</TEXT>
<RCV>4712345678</RCV>
<SND>4711111111</SND>
</MSG>
</MSGLST>
</SESSION>

And I'll get a response looking like this back:

HTTP/1.1 200 Ok
Server: sms3.pswin.com
Content-type: application/xml
Content-length: 156

<?xml version="1.0"?>
<SESSION>
<LOGON>OK</LOGON>
<REASON></REASON>
<MSGLST>
<MSG>
<ID>1</ID>
<STATUS>OK</STATUS>
<INFO></INFO>
</MSG>
</MSGLST>
</SESSION>

So they say.

Could someone plz help me to get this together so I can use cURL to send
and receive this data.

the XML part is easy to get together so its the CURL part I need help to solve!
Received on 2004-07-21