Using CURL with Header

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dennislee85
Forum Newbie
Posts: 15
Joined: Mon Mar 12, 2007 9:16 pm

Using CURL with Header

Post 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
Last edited by dennislee85 on Thu Sep 06, 2007 2:08 am, edited 1 time in total.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Yes. That's a very broad question though. Have you looked at the curl library functions in the manual?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
dennislee85
Forum Newbie
Posts: 15
Joined: Mon Mar 12, 2007 9:16 pm

Post 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.
Post Reply