comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Reading HTML (web) page through socket
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Reading HTML (web) page through socket [message #59815 is a reply to message #59801] Wed, 09 April 2008 12:34 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
rhyme2ri2 wrote:
> Hello all,
>
> I want to read an html(web) page. I am able to do this using socket
> but the problem is that i don't know the size of the page. Is there
> any possible way to know the size of page before reading it using
> sockets. The size is needed as i need to allocate buffer on the basis
> of this size.
>
> Or, if there is a better way to read an html(web) page in idl then
> please let me know.
>
> Thanks & Regards
> -Ritu

If you have IDL 6.4 and up, you can use:

url = 'http://www.google.com'
ourl = obj_new('IDLnetURL')
content = ourl->get(url=url, filename = outName)
obj_destroy, ourl

the whole page (and HTML code) is saved in the variable content, no
matter what size it is!

Jean
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: delvar, all
Next Topic: Re: Most Common IDL Programming Errors

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 00:27:52 PDT 2025

Total time taken to generate the page: 0.08531 seconds