Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Download text file from website
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00941665
Message ID:
00950877
Vues:
14
Hi Bill,

The following code downloads robots.txt file from http://www.microsoft.com
DECLARE INTEGER URLDownloadToCacheFile IN urlmon;
	INTEGER lpUnkcaller, STRING szURL, STRING @szFileName,;
	INTEGER dwBufLength, INTEGER dwReserved, INTEGER pBSC

LOCAL cRequest, nResult, cTargetFilename
cTargetFilename = Repli(Chr(0), 250)
cRequest = "http://www.microsoft.com/robots.txt"

WAIT WINDOW NOWAIT "Downloading remote file..."
nResult = URLDownloadToCacheFile(0, cRequest,;
	@cTargetFilename, Len(cTargetFilename), 0,0)
	
cTargetFilename = STRTRAN(cTargetFilename, Chr(0), "")
IF FILE(cTargetFilename)
	MODIFY FILE (cTargetFilename) NOWAIT
ENDIF

WAIT CLEAR
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform