Hello,
I need to post HTML code to a website from FWH and wait for a response from the website. Can you anyone provide an example of how I can accomplish this function. Here is the code I need to post.
Thank you in advance for your help!'
// sample html code -----------------------------
<FORM ACTION="https://www.aesdirect.gov/weblink/weblink.cgi" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="wl_app_ident" VALUE="APP001"> <INPUT TYPE="HIDDEN" NAME="wl_nologin_url"
VALUE="http://www.weblinktestapp.com/nologin.html">
<INPUT TYPE="HIDDEN" NAME="wl_nosed_url"
VALUE="http://www.weblinktestapp.com/nosed.html">
<INPUT TYPE="HIDDEN" NAME="wl_success_url"
VALUE="http://www.weblinktestapp.com/success.html">
<INPUT TYPE="HIDDEN" NAME="SRN" VALUE="WEBLINKEXAMPLE"> <INPUT TYPE="HIDDEN" NAME="AD1_3" VALUE="TEST CONSIGNEE"> <INPUT TYPE="HIDDEN" NAME="isLine1" VALUE="Y"> <INPUT TYPE="HIDDEN" NAME="IT1_1" VALUE="OS"> <INPUT TYPE="HIDDEN" NAME="IT1_2" VALUE="100000"> <INPUT TYPE="HIDDEN" NAME="IT1_3" VALUE="KG"> <INPUT TYPE="HIDDEN" NAME="IT1_4" VALUE="100"> <INPUT TYPE="HIDDEN" NAME="IT1_7" VALUE="150"> <INPUT TYPE="HIDDEN" NAME="IT1_8" VALUE="C33"> <INPUT TYPE="HIDDEN" NAME="IT1_12" VALUE="ELECTRONIC EQUIPMENT"> <INPUT TYPE="HIDDEN" NAME="IT1_13" VALUE="3505100092"> <INPUT TYPE="HIDDEN" NAME="IT1_15" VALUE="N"> <INPUT TYPE="HIDDEN" NAME="IT1_21" VALUE="D">
</FORM>
HTTP post and response
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Darrell,
I think maybe you misunderstand how this works. You create the html file on your computer then open it in a browser.
This is from their website.
I think maybe you misunderstand how this works. You create the html file on your computer then open it in a browser.
This is from their website.
JamesIt is possible for a Windows desktop application to use AESWebLink. In this case, the application could write an html file to the local PC that includes the form to be submitted to AESWebLink and then open the html file in the web browser on the PC. The form can then be submitted to AESWebLink.
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
You guys are getting crazy for a thing that can be easly resolved !!!!! don't kill pigeons with cannon balls.
Have you ever heard about TURL class? (comes along with xHarbour), it's very simple to use:
and then you just have to replace <here comes the call to the web page> with the URL encoded form of the webpage, that is this:
I think there's something missing in the URL code (the post method in deed) you have to check the Open Method of the TIPClient class in order to know how to call the POST method
Have you ever heard about TURL class? (comes along with xHarbour), it's very simple to use:
Code: Select all
oUrl := tURL():New(<here comes the call to the web page>)
oClient := tIPClient():New( oUrl )
oClient:nConnTimeout := 20000
IF oClient:Open( oUrl )
oClient:ReadToFile( ".\file_name_with_result_here.whatever" )
oClient:Close()
ENDIF
So the final code is this:
Code: Select all
oUrl := tURL():New("https://www.aesdirect.gov/weblink/weblink.cgi?wl_app_ident=APP001&wl_nologin_url=http://www.weblinktestapp.com/nologin.html&wl_nosed_url="http://www.weblinktestapp.com/nosed.html&wl_success_url=http://www.weblinktestapp.com/success.html&SRN=WEBLINKEXAMPLE&AD1_3=TEST+CONSIGNEE&isLine1"=Y&IT1_1=OS&IT1_2=100000&IT1_3=KG&IT1_4=100&IT1_7=150&IT1_8E=C33&IT1_12=ELECTRONIC&EQUIPMENT&IT1_13=3505100092&IT1_15=N&IT1_21=D")
oClient := tIPClient():New( oUrl )
oClient:nConnTimeout := 20000
IF oClient:Open( oUrl )
oClient:ReadToFile( ".\result.txt" )
oClient:Close()
ENDIF
Saludos
R.F.
R.F.
-
- Posts: 1
- Joined: Fri Nov 12, 2010 9:21 pm
AESWEBLINK
Rene:
any ready application out there to accomplish submitting our data in a mysql database the the AESWEBLLINK?
Out of the 100 certified aesdirect vendors, some one could have done this 10 times...
Tks..
Peter
any ready application out there to accomplish submitting our data in a mysql database the the AESWEBLLINK?
Out of the 100 certified aesdirect vendors, some one could have done this 10 times...
Tks..
Peter
R.F. wrote:You guys are getting crazy for a thing that can be easly resolved !!!!! don't kill pigeons with cannon balls.
Have you ever heard about TURL class? (comes along with xHarbour), it's very simple to use:
and then you just have to replace <here comes the call to the web page> with the URL encoded form of the webpage, that is this:Code: Select all
oUrl := tURL():New(<here comes the call to the web page>) oClient := tIPClient():New( oUrl ) oClient:nConnTimeout := 20000 IF oClient:Open( oUrl ) oClient:ReadToFile( ".\file_name_with_result_here.whatever" ) oClient:Close() ENDIF
So the final code is this:
I think there's something missing in the URL code (the post method in deed) you have to check the Open Method of the TIPClient class in order to know how to call the POST methodCode: Select all
oUrl := tURL():New("https://www.aesdirect.gov/weblink/weblink.cgi?wl_app_ident=APP001&wl_nologin_url=http://www.weblinktestapp.com/nologin.html&wl_nosed_url="http://www.weblinktestapp.com/nosed.html&wl_success_url=http://www.weblinktestapp.com/success.html&SRN=WEBLINKEXAMPLE&AD1_3=TEST+CONSIGNEE&isLine1"=Y&IT1_1=OS&IT1_2=100000&IT1_3=KG&IT1_4=100&IT1_7=150&IT1_8E=C33&IT1_12=ELECTRONIC&EQUIPMENT&IT1_13=3505100092&IT1_15=N&IT1_21=D") oClient := tIPClient():New( oUrl ) oClient:nConnTimeout := 20000 IF oClient:Open( oUrl ) oClient:ReadToFile( ".\result.txt" ) oClient:Close() ENDIF
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: HTTP post and response
Peter,
I don't know anything about this topic, but I searched for "aesdirect" and the first software that came up says this:
Perhaps that is what you are looking for? I'm not sure if MySQL is ODBC compliant.
Also, I didn't quite understand some of the previous messages in this thread. Is the example code not working?
Regards,
James
I don't know anything about this topic, but I searched for "aesdirect" and the first software that came up says this:
http://www.elading.com/features.aspxThe eLading Documents Software is based on industry standard ODBC technology and can therefore connect to any ODBC compliant database such as Microsoft SQL Server, Sybase SQL Anywhere, etc.
Perhaps that is what you are looking for? I'm not sure if MySQL is ODBC compliant.
Also, I didn't quite understand some of the previous messages in this thread. Is the example code not working?
Regards,
James