
Desperately need an HTTP URL encode routine
Well it may depend on what control if any you are using.
This is one will work using Cresents RAW data send procedure or
for that matter any control that sends RAW data.
This is the basics you may want to enhance with additional header
info, of course the HTTP version should be adjusted as your
VB app/webrowser is capable of handling. I don't think 1.0
has to much complication to it.
Obviously this is a POST because GETs are not encoded like so:
---------------
Datasend = "POST /cgi-win/your-cgi-or-exe.exe/case HTTP/1.0" & vbCrLf
Datasend = Datasend & "Accept: */*" & vbCrLf
Datasend = Datasend & "User-Agent: MY SUPER WEB APP" & vbCrLf
Datasend = Datasend & "Content-Type: application/x-www-form-urlencoded"
& vbCrLf
URL = "company=brett"
URL = URL & "&name=brett"
URL = URL & "&address=brett"
URL = URL & "&city=brett"
URL = URL & "&state=brett"
URL = URL & "&zip=brett"
URL = URL & "&email=brett"
URL = URL & "&phone=brett"
URL = URL & "&fax=brett"
Datasend = Datasend & "Content-Length: " & Len(URL) & vbCrLf & vbCrLf
Datasend = Datasend & URL
CIHTTP1.SendHTTPCommand (Datasend)
Quote:
> You know - an URL encoding routine.
> For example, when you submit an HTML form,
> the browser URL encodes all of the submitted data into
> one large string, thereby allowing the webserver to understand
> what data was submitted.
> (sorry about the typo - I meant routine instead of routing :(
> says...
> >can you explain a bit more what you mean.
> >> Does anyone have an HTTP URL encode routing?
> >> I am dying for one...
> >> I've looked everywhere, including this group and
> >> it is nowhere to be found.
> >> Thanks,
> >> Ted