Use this routine to submit information to a script/service on the internet, and retrieve the result page. The details submitted may be up to 10,000 bytes, and the result page may be up to 2Mb in size, the URL may be up to 2Kb in size.
; Create the data to submit to the web page
$51=$user
perform "_MHCANONICALISE"
dummye1="name=%%$51"
$51="Arthur Barrett"
perform "_MHCANONICALISE"
dummye1="%%dummye1%%%&lname=%%$51"
$51="name,lname"
perform "_MHCANONICALISE"
dummye1="%%dummye1%%%&required=%%$51"
dummye1="%%dummye1%%%&data_order=%%$51"
dummye1="%%dummye1%%%&submit_to=demo@march-hare.com"
dummye1="%%dummye1%%%&autorespond=no"
dummye1="%%dummye1%%%&automessage=thanksfordemo.txt"
dummye1="%%dummye1%%%&outputfile=formdemo.log"
dummye1="%%dummye1%%%&emailfile=email.log"
dummye1="%%dummye1%%%&form_id=Use+March+Hare+Tools+Demo+Use"
dummye1="%%dummye1%%%&ok_url=http://march-hare.com/maillist/thanks_ud8.txt"
dummye1="%%dummye1%%%¬_ok_url=%2Fmaillist%2Foops.html"
; sumbit the data to the ASP script
$51="march-hare.com"
$52="/maillist/demorun.asp"
$53="" ; optionally contains the IP address of $51 if DNS resolution fails
$54=dummye1
perform "_mhhttppost"
dummye1=$55 ; result returned in $55
Notes:
Different server side scripting languages are available for retrieving the posted information, including:
For example, to retrive the posted value of ok_url
in ASP you can use Request.Form("ok_url")
.
The mhhttppost
function is available for all Windows and Unix platforms supported by Uniface.
Some versions of Uniface may truncate the size of the register.
Alternative Signature Definition (Uniface 7.2/8.2):
short httpwebpost2(unsigned char *inServer,
unsigned char *inServerIP,
unsigned char *inURL,
char *inClientData,
char **inpszStore)
inpszStore
is the result and should be large enough to take the result from the web server. The size is never checked, so the driver may crash if the string is not large enough. This version does not have the 10,000/2MB/2Kb limits that the perform
version (above) has.
$Revision: 1.7 $ $Date: 2011/02/28 02:56:32 $ | [go to top] |