Page 1 of 1

Using CURL with Header

Posted: Thu Sep 06, 2007 1:33 am
by dennislee85
Hi,

May i know is there any method i could use to send out a HTTP POST request with header and body data to the remote server using CURL? My HTTP header is like below:

Code: Select all

POST /messaging.mobileway.com/yuuzoo_tes42477/yuuzoo_tes42477.sms HTTP/1.1
HOST: messaging.mobileway.com
Authorization: Basic password12345
Content-Length: 160
HTTP Body likes below:

Code: Select all

Version=2.0
Subject=Test
[MSISDN]
List=+6593880590,+6591165669	
[MESSAGE]
Text=TEST FROM DOS NUMBER 
[SETUP]
OriginatingAddr=Yuuzoo
[END]
Please help, Thanks

Posted: Thu Sep 06, 2007 2:07 am
by s.dot
Yes. That's a very broad question though. Have you looked at the curl library functions in the manual?

Posted: Mon Sep 10, 2007 9:10 pm
by dennislee85
I had tried certain curl methods i found on php.net. but somehow my remote server side unable to authenticate my header. The server returns an error message saying Authentication required. I had also tried php header() also but it gave me same result.

Please advise.