Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to send a 'filled out' form to a web site...
Message
From
27/08/1999 13:04:10
 
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00258164
Message ID:
00258508
Views:
23
>>>There's a credit card validation site... where we type in the credit card number, amount, address, etc. The service then verifies that the amount is available on the card and displays a 'response' page...
>>>
>>>I need to send this data and get the response from within VFP...
>>>
>>>any ideas??
>>>
>>>TIA
>>
>>There are a couple of ways you can do this. Perhaps the easiest requires that the machine have IE installed, and then you can run some code like this...
>>
>>oIE = CREATEOBJECT("InternetExplorere.Application")
>>oIE.Navigate("http://www.somesite.com/someccvalidationpage.htm")
>>* pause here, perhaps polling...
>>
>>oIE.Document.Forms(0).ccNumber.Value="1234-1234-1234-1234"
>>oIE.Document.Forms(0).ccExpDate.Value="01/99"
>>oIE.Document.Forms(0).Submit()
>>
>>* pause here, perhaps polling...
>>?oIE.Document.Body.InnerText && displays the text of the resulting page.
>>
>>To find the names of the form variables to use, view source on the page that accepts the CC info, and look for the names of the text fields that accept entry. Also, if there is more than one form on the page, you'' need to specify it's name instead of 0, or figure out it's correct ordinal position (the forms collection is a 0 based collectoin): 0 is the first form).
>>
>>The other easy way is with Rick Strahl's wwIPStuff. This doesn't require IE on the machine (except on very old versions of Win95), because it uses WinInet.dll for connectivity.
>>
>>wwIPStuff comes with a lot of documentation on how to post form variables and submit requests...
>
>Thanks Eric...
>
>I'm planning on using wwIPStuff but I'm still researching the exact steps...

The only complicated part is figuring out the names of the form variables. it can be a pain sometimes, but others it's pretty easy- If you give me the URL of the validation site you are working with, I could give it a shot for you-
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform