Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 132,683 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,224 people online right now. Registration is fast and FREE... Join Now!




Setting Http Post Variables

 
Reply to this topicStart new topic

Setting Http Post Variables, Anyone know the syntax for this?

jbeall
post 1 Oct, 2002 - 09:29 AM
Post #1


New D.I.C Head

*
Joined: 1 Oct, 2002
Posts: 42

Greetings,

Anyone know the HTTP Header syntax for POST variables? Normally people just use forms to let the browser worry about submitting the proper headers, but if I want to set POST variables myself using the header() function, what is the header? A bit like telneting to port 25 to do my own SMTP.

Any thoughts?
User is offlineProfile CardPM

Go to the top of the page

LuxFX
post 15 Oct, 2002 - 11:38 AM
Post #2


D.I.C Head

**
Joined: 9 Aug, 2001
Posts: 63

something I was just looking for myself the other day. here's an example:
CODE

POST /script.php HTTP/1.0
From: users@somewhere.com
User-Agent: telnetAgent/1.1
Host: www.domainname.com
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 35

var1=value1&var2=value2&var3=value3


Of course some things will change in your implementation. I don't think you need the "From" there, but I included it just in case. The Content-Length header is important, and make sure there are two line-breaks between the last header and the data.

cheers!
LuxFX
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 06:51AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month