Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting a file
Message
From
01/10/2002 14:36:22
Fabian Belo
Independent Developer
Argentina
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
00706372
Message ID:
00706520
Views:
26
Hi Steve.
Just call the function: vfphttp(urlactual, tmpfileM) where urlactual will be the URL address (http:// included) and tmpfileM your temporal txt storage file.
Here an example. I use it to catch/update URLs (title, keywords and text). Of course, I have the URLs within a table...
SET SAFETY OFF
Clear
tmpfileM="Path of your tmpfileM\tmpfilename.txt"
recordset.MoveFirst
DO WHILE !recordset.eof() 
	
	urlactual=ALLTRIM(recordset.fields("url").value)
	? urlactual
	WAIT "Gathering information from: "+urlactual WINDOW nowait
	vfphttp(urlactual, tmpfileM)

* Function that retrieves title (No provided)
	eltitulo=cla1(tmpfileM)
* Function that retrieves keywords (No provided)
	laskeywords=cla2(tmpfileM)
* Function that retreives text	(No provided)
	elsitiohtml=cla3(tmpfileM)
	? "URL:  "+alltrim(str(total2))+" de "+alltrim(str(total1))
	? "Titulo:  "+eltitulo
	? "Keywords:  "+laskeywords
	? "Contenido:  "+elsitiohtml
	?"*******************************************************************************"
	?""
	
	
	recordset.fields("titulo").value=eltitulo
	
	recordset.fields("keywords").value=laskeywords
	
	recordset.fields("sitiohtml").value=elsitiohtml

	WAIT "Done" WINDOW TIMEOUT 1
	DELETE FILE tmpfilename.txt
	recordset.MoveNext
	total2 = total2+1
ENDDO
SET SAFETY ON
recordset.Close
coneccion.Close
FLUSH
"Since I've read that alcohol is bad... I quit reading."
Me


http://www.fabianbelo.com.ar
Previous
Reply
Map
View

Click here to load this message in the networking platform