|
Bay Six Software Beyond the Basics
|
View previous topic :: View next topic |
Author |
Message |
Brent Site Admin
Joined: 01 Jul 2005 Posts: 800
|
Posted: Aug 15th, 2006, 4:53am Post subject: [DEMO] Post form URL-encoded |
|
|
The following code is just the "driver" portion of the demo. See below for download link.
Code: | '===============================================================================
' PostUrlEncoded 1.0
' By Brent D. Thorn, Aug. 2006
' Demonstrates posting an HTML form with URL encoding using the WinInet API.
' PUBLIC DOMAIN
'===============================================================================
' Post to <http://www.b6sw.com/forum/search.php?mode=results>.
server$ = "www.b6sw.com"
page$ = "/forum/search.php?mode=results"
formdata$ = FormData$( _
FormInp$( "search_keywords", "wmliberty" )+_
FormInp$( "search_terms", "any" )+_
FormInp$( "search_author", "" )+_
FormInp$( "search_forum", "-1" )+_
FormInp$( "search_time", "0" )+_
FormInp$( "search_fields", "all" )+_
FormInp$( "search_cat", "-1" )+_
FormInp$( "sort_by", "0" )+_
FormInp$( "sort_dir", "DESC" )+_
FormInp$( "show_results", "posts" )+_
FormInp$( "return_chars", "200" )+_
"" )
Open "wininet" For DLL As #wininet
Print PostUrlEncoded$( server$, 80, page$, formdata$ )
Close #wininet
End |
Description: |
|
Download |
Filename: |
PostUrlEncoded.zip |
Filesize: |
3.63 KB |
Downloaded: |
653 Time(s) |
_________________ Brent
Last edited by Brent on Mar 13th, 2007, 5:11am; edited 4 times in total |
|
Back to top |
|
|
Brent Site Admin
Joined: 01 Jul 2005 Posts: 800
|
Posted: Aug 20th, 2006, 4:41am Post subject: Re: [DEMO] Post form URL-encoded |
|
|
Update: I would have posted this to the LB Conforums' Public Domain board if it weren't so large.
The final release removes the IsLBHandle function because it will not work in LB's debugger. It will always halt when the handle is invalid. I couldn't think of any way around it. I thought I had something special, but it seems LB has a bug with consistency between normal run-time errors and debug-time errors.
_________________ Brent |
|
Back to top |
|
|
Gordon Guest
|
Posted: Aug 20th, 2006, 11:06pm Post subject: Re: [DEMO] Post form URL-encoded |
|
|
Hello Brent,
There is a small bug in your listing.
A remark is missing somewhere.
Gordon
|
|
Back to top |
|
|
Brent Site Admin
Joined: 01 Jul 2005 Posts: 800
|
Posted: Aug 21st, 2006, 2:23am Post subject: Re: [DEMO] Post form URL-encoded |
|
|
Thanks for catching that, Gordon! I had found that and fixed it before trying to post it to Conforums. But when I couldn't post it, I tried trimming it down without luck, so I just restored it (Alt+F, 1, N) and lost the fix.
The original post has this fixed in the code block and download.
_________________ Brent |
|
Back to top |
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
|