Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit and internet form

Status
Not open for further replies.

Horrid

Programmer
May 20, 1999
373
Hi,<br><br>I need to submit data to a php script but have very little knowledge of how to format the string.<br><br>I am using the Internet transfer control and the exectute method but don't know how to stucture my request.<br><br>What goes in the input data and what goes in input headers?&nbsp;&nbsp;And more to the point what is an input header?<br>inet1.execute(&quot;url&quot;, POST, WHAT DATA, WHAT HEADER)<br>&nbsp;<br>Thanks for any help<br>Travis
 
Dear Travis,<br><br>Not being a VB person I cannot be sure about my answer, however I have used the WinInet interfaces from C++ so...<br><br>&gt; What goes in the input data <br><br>Your querystring in HTML parlance. What I mean is that 'What Data' will be your request variables(querystring) they are in the form of name=value and they are & delimited so that a query string might look like this:<br><br>username=bob&email=<A HREF="mailto:bob@bobs.com">bob@bobs.com</A><br><br>Now the entire string must be url-encoded which is the process of modifying any illegal characters by encoding them, for instance, spaces must be encoded as they are not allowed in the content portion of an HTTP message. There are others but you don't need to know the details since the WinInet library provides a function to perform this encoding. Sorry, I don't know what it is off hand.<br><br>&gt; what goes in input headers<br><br>The headers are HTTP headers and at the very least you will need a 'content-length' header whose value equals the length of your url-encoded querystring. So it would look something like this<br><br>content-length: 211<br><br>where 211 is the length of your querystring<br><br>you might also need a content-type header like<br><br>content-type: application/x- header is ended with a CRLF character pair so you would put them all together in a string and that would be your inputHeaders parameter<br><br>Hope this helps<br>-pete<br>
 
I need to know how to assign memory allocation for communication purposes using visual basics
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top