Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access the response from a web site
Message
De
23/02/2006 10:21:01
Pamela Bulmahn
The University of Iowa
Iowa, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01096847
Message ID:
01098506
Vues:
12
Anatoliy,

You are a real peach. This works great.

I made a slight modification to your code and slid it into the validation program and validated 200 G/L numbers in seconds.


* MFKGetValid.prg
* Routine to access MFK validation url.
* From Universal Thread response
* 2/23/2006
DECLARE INTEGER URLDownloadToCacheFile IN urlmon;
INTEGER lpUnkcaller, STRING szURL, STRING @szFileName,;
INTEGER dwBufLength, INTEGER dwReserved, INTEGER pBSC

cFilename = RemoteToLocal("http://...")
* open and parse cFilename

FUNCTION RemoteToLocal(cRequest)
LOCAL nResult, cTargetFile
cTargetFile = Repli(Chr(0), 250)
WAIT WINDOW NOWAIT "Downloading remote file..."
nResult = URLDownloadToCacheFile(0, cRequest, @cTargetFile,;
Len(cTargetFile), 0,0)
WAIT CLEAR
STRTRAN(cTargetFile, Chr(0), "")
** this is the change so I can parse the contents
mcreturn = ALLTRIM(FILETOSTR(ctargetfile))
***RETURN STRTRAN(cTargetFile, Chr(0), "")
RETURN mcreturn


Thanks again.
Pamela
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform