Sorry, a bit OT.

I can get the HTML from a web page between the <BODY>...</BODY> tags using
oie.Document.Body.InnerHTML in VFP (where oie is an internet explorer
application object)..

So how do I get the <HEADER>...</HEADER> source, or even better the whole
HTML source?
? oie.Document.Header.InnerHTML sounds like a good guess, but no luck there,
and I can't find anything else which looks promising.

Thanks



---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003

Re: OT: IE and HTML header source by Eric

Eric
Thu Aug 07 00:34:21 CDT 2003

Hello, Neil!
You wrote on Wed, 6 Aug 2003 21:10:23 +0100:

NW> I can get the HTML from a web page between the <BODY>...</BODY> tags
NW> using oie.Document.Body.InnerHTML in VFP (where oie is an internet
NW> explorer application object)..

NW> So how do I get the <HEADER>...</HEADER> source, or even better the
NW> whole HTML source?
NW> ? oie.Document.Header.InnerHTML sounds like a good guess, but no luck
NW> there, and I can't find anything else which looks promising.

See if this is an option for you. There is an improved version of the
ReadURL() function on the web written by one of the MVP's but I can't find
the url in my archives.
HOWTO: Retrieve and Insert HTML Into Memo Field
http://support.microsoft.com/default.aspx?scid=kb;en-us;174524
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Re: IE and HTML header source by George

George
Thu Aug 07 08:19:13 CDT 2003

perhaps the http class can do a better job:

* Connect to the web
webSite=3D"http://www.yahoo.com"
oHttp =3D CREATEOBJECT("Microsoft.XmlHttp")
oHttp.Open("GET",webSite,.F.)
oHttp.Send()
response =3D oHttp.ResponseText
* Do stuff with response

"Neil Waterworth" <nospam-or-nwaterworth@lineone.net> wrote in message =
news:%23p5LGbFXDHA.1896@TK2MSFTNGP12.phx.gbl...
> Sorry, a bit OT.
>=20
> I can get the HTML from a web page between the <BODY>...</BODY> tags =
using
> oie.Document.Body.InnerHTML in VFP (where oie is an internet explorer
> application object)..
>=20
> So how do I get the <HEADER>...</HEADER> source, or even better the =
whole
> HTML source?
> ? oie.Document.Header.InnerHTML sounds like a good guess, but no luck =
there,
> and I can't find anything else which looks promising.
>=20
> Thanks
>=20
>=20
>=20
> ---
>=20
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003
>=20
>

Re: IE and HTML header source by George

George
Thu Aug 07 08:35:03 CDT 2003

well, this one does what you asked for, i guess

oIE =3D CreateObject("internetexplorer.application")
oIE.Navigate("http://www.google.com")
oDoc =3D oIE.Document
html =3D oDoc.documentElement.outerHTML


"Neil Waterworth" <nospam-or-nwaterworth@lineone.net> wrote in message =
news:%23p5LGbFXDHA.1896@TK2MSFTNGP12.phx.gbl...
> Sorry, a bit OT.
>=20
> I can get the HTML from a web page between the <BODY>...</BODY> tags =
using
> oie.Document.Body.InnerHTML in VFP (where oie is an internet explorer
> application object)..
>=20
> So how do I get the <HEADER>...</HEADER> source, or even better the =
whole
> HTML source?
> ? oie.Document.Header.InnerHTML sounds like a good guess, but no luck =
there,
> and I can't find anything else which looks promising.
>=20
> Thanks
>=20
>=20
>=20
> ---
>=20
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003
>=20
>

Re: IE and HTML header source by Andrew

Andrew
Thu Aug 07 10:06:32 CDT 2003

"Neil Waterworth" <nospam-or-nwaterworth@lineone.net> wrote in message
news:#p5LGbFXDHA.1896@TK2MSFTNGP12.phx.gbl...
> Sorry, a bit OT.
>
> I can get the HTML from a web page between the <BODY>...</BODY> tags using
> oie.Document.Body.InnerHTML in VFP (where oie is an internet explorer
> application object)..

I don't know how easy it is for you to use libcurl but that sure can do it,
I know you work with *X things and so you might like it.
I've been using curl (executable) but libcurl is a bit more api-like for all
you that prefer it that way.
http://curl.haxx.se/

Maybe it is easier to use things already in fox, don't know.
HTH
Andrew Howell




Re: IE and HTML header source by Neil

Neil
Thu Aug 07 14:39:07 CDT 2003

Thanks George,

That seems to work for me.

"George" <george@zeliot.com> wrote in message
news:O0W9AaOXDHA.652@tk2msftngp13.phx.gbl...
perhaps the http class can do a better job:

* Connect to the web
webSite="http://www.yahoo.com"
oHttp = CREATEOBJECT("Microsoft.XmlHttp")
oHttp.Open("GET",webSite,.F.)
oHttp.Send()
response = oHttp.ResponseText
* Do stuff with response

"Neil Waterworth" <nospam-or-nwaterworth@lineone.net> wrote in message
news:%23p5LGbFXDHA.1896@TK2MSFTNGP12.phx.gbl...
> Sorry, a bit OT.
>
> I can get the HTML from a web page between the <BODY>...</BODY> tags using
> oie.Document.Body.InnerHTML in VFP (where oie is an internet explorer
> application object)..
>
> So how do I get the <HEADER>...</HEADER> source, or even better the whole
> HTML source?
> ? oie.Document.Header.InnerHTML sounds like a good guess, but no luck
there,
> and I can't find anything else which looks promising.
>
> Thanks
>
>
>
> ---
>
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003
>
>


---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003



Re: IE and HTML header source by Neil

Neil
Thu Aug 07 14:50:54 CDT 2003

Thanks Andrew,

I'm trying to generate static html versions of Perl/CGI generated pages on
our website for search engine submissions. It's probably a better idea to
generate these pages directly from the Linux web server, so I'll look into
this one.

"Andrew Howell" <andrew.howell@work> wrote in message
news:O5$eGZPXDHA.1872@TK2MSFTNGP12.phx.gbl...
> "Neil Waterworth" <nospam-or-nwaterworth@lineone.net> wrote in message
> news:#p5LGbFXDHA.1896@TK2MSFTNGP12.phx.gbl...
> > Sorry, a bit OT.
> >
> > I can get the HTML from a web page between the <BODY>...</BODY> tags
using
> > oie.Document.Body.InnerHTML in VFP (where oie is an internet explorer
> > application object)..
>
> I don't know how easy it is for you to use libcurl but that sure can do
it,
> I know you work with *X things and so you might like it.
> I've been using curl (executable) but libcurl is a bit more api-like for
all
> you that prefer it that way.
> http://curl.haxx.se/
>
> Maybe it is easier to use things already in fox, don't know.
> HTH
> Andrew Howell
>
>
>


---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003



Re: OT: IE and HTML header source by Neil

Neil
Thu Aug 07 14:54:19 CDT 2003

Thanks Eric,

I'll try that.

"Eric den Doop" <ericdendoop@xspamblockxfoxite.com> wrote in message
news:esOqPWKXDHA.2640@TK2MSFTNGP09.phx.gbl...
> Hello, Neil!
> You wrote on Wed, 6 Aug 2003 21:10:23 +0100:
>
> NW> I can get the HTML from a web page between the <BODY>...</BODY> tags
> NW> using oie.Document.Body.InnerHTML in VFP (where oie is an internet
> NW> explorer application object)..
>
> NW> So how do I get the <HEADER>...</HEADER> source, or even better the
> NW> whole HTML source?
> NW> ? oie.Document.Header.InnerHTML sounds like a good guess, but no luck
> NW> there, and I can't find anything else which looks promising.
>
> See if this is an option for you. There is an improved version of the
> ReadURL() function on the web written by one of the MVP's but I can't find
> the url in my archives.
> HOWTO: Retrieve and Insert HTML Into Memo Field
> http://support.microsoft.com/default.aspx?scid=kb;en-us;174524
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
>
>


---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003



Re: IE and HTML header source by George

George
Fri Aug 08 07:34:55 CDT 2003

correct me if i'm wrong
the 'outer' of the body element will give you the same as the 'inner' =
with body tags as you said, but...
the 'outer' of the documentElement of the main document will give you =
the whole html
maybe you overlooked the oDoc.DOCUMENTELEMENT.outerHTML part
;-)


"Neil Waterworth" <nospam-or-nwaterworth@lineone.net> wrote in message =
news:%23BmamvRXDHA.2464@TK2MSFTNGP09.phx.gbl...
> For me, this one seems to give the same as InnerHTML only surrounded =
by the
> <BODY></BODY> tags. Your http class suggestion in your previous post =
does
> the trick, though.
>=20
>=20
> "George" <george@zeliot.com> wrote in message
> news:uj2J3iOXDHA.1384@TK2MSFTNGP10.phx.gbl...
> well, this one does what you asked for, i guess
>=20
> oIE =3D CreateObject("internetexplorer.application")
> oIE.Navigate("http://www.google.com")
> oDoc =3D oIE.Document
> html =3D oDoc.documentElement.outerHTML
>=20
>=20
> "Neil Waterworth" <nospam-or-nwaterworth@lineone.net> wrote in message
> news:%23p5LGbFXDHA.1896@TK2MSFTNGP12.phx.gbl...
> > Sorry, a bit OT.
> >
> > I can get the HTML from a web page between the <BODY>...</BODY> tags =
using
> > oie.Document.Body.InnerHTML in VFP (where oie is an internet =
explorer
> > application object)..
> >
> > So how do I get the <HEADER>...</HEADER> source, or even better the =
whole
> > HTML source?
> > ? oie.Document.Header.InnerHTML sounds like a good guess, but no =
luck
> there,
> > and I can't find anything else which looks promising.
> >
> > Thanks
> >
> >
> >
> > ---
> >
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003
> >
> >
>=20
>=20
> ---
>=20
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003
>=20
>