Page 1 of 1 1
Topic Options
#130686 - 2004-12-06 05:32 PM HTML to text dump
Xmine Offline
Fresh Scripter

Registered: 2004-06-29
Posts: 10
Anyone got a method to dump a loaded web site down to a .txt file. Either from "open" mode or just load it direct down to the file ?

Greetz
X-mine

Top
#130687 - 2004-12-06 06:27 PM Re: HTML to text dump
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
you can do something like this.

Code:

$url = "http://google.com"

$XMLHTTP = createobject("microsoft.xmlhttp")
$XMLHTTP.open("GET", $url, not 1)
$XMLHTTP.send
$return = $xmlhttp.responsetext

? $return



Top
#130688 - 2004-12-06 06:31 PM Re: HTML to text dump
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well... Bryce beat me to it but his does not write to a file.
Code:
BREAK ON

$http=createobject("microsoft.xmlhttp")
$http.open("GET","http://www.kixtart.org/default.htm",not 1)
$http.send
$html=$http.responsebody
$rc=Open(1,'c:\html.htm',5)
$rc=writeline(1,$html)
$rc=close(1)

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#130689 - 2004-12-07 06:01 AM Re: HTML to text dump
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
There's even a UDF for that: ReadHTML() - Retrieve Web page via XMLHTTP
_________________________
There are two types of vessels, submarines and targets.

Top
#130690 - 2004-12-07 08:03 AM Re: HTML to text dump
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
cool...
default.htm is retrieved even though there is no such thing...
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.052 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org