|
-
Jul 5th, 2000, 03:24 AM
#2
Fanatic Member
Well, first you'll need to encode the data like this:
field1=xyz&field2=abc&field3=123
and append it to the url like so:
http://www.blank.com/cgi-bin/form.cg...abc&field3=123
all nonletters and nonnumbers must be converted in the following fassion: %(2 digit ascii code in hex)(i.e. a space is %20 because ascii 32 is hex 20) if the hex value is equal to or less than "#F" a zero must be inserted. (i.e. character 3 is converted to %03; character "#C" is converted to %0c)
if field 1 equals "one + two = three" the encoded text would be "field1=one%20%2b%20two%20%3d%20three"
now combine the encoded fields and the url into a string. (btw, the fields won't always be named field1, field2, etc. you'll need the correct names for each field. Some cgi even reqires them in a certain order)
now to open the url in the default browser, yould need the follow this code:
Code:
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Sub OpenURL(url as string)
'Make sure the url does not start with a "http://"
ShellExecute 0, "Open", "http://" & url, vbNullString, vbNullString, vbMaximizedFocus
End Sub
Now, on how to put the values into the browser, i have no idea.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|