Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send HTTP API calls without opening browser

Status
Not open for further replies.

ezpzjohn

Programmer
Jun 29, 2001
50
GB
I need help on how to get started with sending and receiving calls from VFP9 to an API located on the Internet without an IE browser window opening.

This is the URL I need to send and receive for:


I need to be able to capture the numeric value returned.

I am able to do this in IE; for example typing:


with correct values for "myusername" and "mypassword" will show a web page with the number of credits.
Typing in the above URL as it is will return the value -501 (user name not found).

I have not had much experience accessing the Internet from VFP and really don't know where to start. Any pointers would be greatly appreciated.
 
Many thanks to Mike Lewis for his very prompt reply (you can't see it as this posting has been moved between forums and his reply has been lost).

I have tried using the Microsoft Internet Transfer Control and it works like a charm! All I had to do was add it to a form as an ActiveX Control (OLE Control). I then stored the command I needed to send to the object's URL property and then called the OpenURL method:

THISFORM.Olecontrol1.URL= " + THISFORM.myusername + "&Password=" + THISFORM.mypassword + "&Action=CheckCredits"

lcValue= THISFORM.Olecontrol1.OpenURL()

This.Caption= lcValue + " credits"


Thanks again Mike!

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top