curl-users
Re: My buffer in a variable - c#
Date: Sun, 16 Nov 2008 09:20:32 -0800
On Sun, Nov 16, 2008 at 03:31:32PM +0000, clement chazarra wrote:
> I am using libcurl.net to retrieve a web page source code and treat it.
> I can connect and get a page source code (following the easyget.cs example),
> but when I try with the specific page I need, it seems the size of the buffer
> is too small, I just get the end of the source code..
>
> public static Int32 OnWriteData(Byte[] buf, Int32 size, Int32
> nmemb,Object extraData){
>
> String mydata = System.Text.Encoding.UTF8.GetString(buf);
>
> return size * nmemb;
> }
>
> mydata retrieves only a part of the web page source code..
>
> How to get whole page source code, whatever size it is?
>
> I believe the answer must be easy, but I'm getting really frustrated with this
> problem, so if somebody could give me a little hand, it would be great.
Look at the getinmemory.c example program instead.
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has moved ------------------------------------------------------------------- List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2008-11-16