Thread: insert webpage content into Integer with cURL

  1. #1
    Registered User
    Join Date
    May 2011
    Posts
    8

    Question insert webpage content into Integer with cURL

    hey, i wrote a PHP application which set the content of HTML file to 1 or 0. next I want to insert this '1' or '0' into varibale/Int.
    I have been looking for solution, i found that there is cURL for c.
    However curl_easy_perform function doesn't return the file content, I have found a solution for this problem here, but it look really complected ( memory allocation and so on ).
    libcurl - getinmemory.c

    isn't there some simple solution for it?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Where do you want this int variable to exist? In PHP? In a file? In Larry's Discount Digit Emporium?

  3. #3
    Registered User
    Join Date
    May 2011
    Posts
    8
    I want to insert this into an Int variable in my C program

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    So what "didn't work" about curl_easy_perform? The default is to write the response to stdout -- if you want to capture it yourself, you'll need to write a handler for the response yourself.

  5. #5
    Registered User
    Join Date
    May 2011
    Posts
    8
    Quote Originally Posted by tabstop View Post
    So what "didn't work" about curl_easy_perform? The default is to write the response to stdout -- if you want to capture it yourself, you'll need to write a handler for the response yourself.
    well, you gave me any idea - to grab the our put of system()
    and then i used curl package for linux like this

    system("curl http://google.com");

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. cURL and piping
    By carrotcake1029 in forum Windows Programming
    Replies: 1
    Last Post: 09-25-2010, 02:35 PM
  2. cURL webpage download.
    By daveoffy in forum C Programming
    Replies: 1
    Last Post: 02-17-2010, 02:28 PM
  3. curl problem
    By cnu_sree in forum C Programming
    Replies: 5
    Last Post: 10-27-2007, 05:58 AM
  4. cURL class
    By _izua_ in forum C++ Programming
    Replies: 9
    Last Post: 10-14-2007, 07:28 AM
  5. Replies: 1
    Last Post: 09-17-2001, 05:46 AM