LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 10-23-2009, 04:08 PM   #1
Kunsheng
Member
 
Registered: Mar 2009
Posts: 82

Rep: Reputation: 16
[libcurl] disable output in terminal


I am doing some libcurl program in windows xp with VC 2005 (Win 32 program):

program reads a list of urls from input file and try to check http code for each of them.

The program runs pretty slow (10-15 seconds to fetch code per url !) ,and libcurl keep output everything into terminal when I run the program, what's more, it seems the program is NOT just fetching HTTP code in header but the whole page content.

The details code is as below:

Code:
   CURL *curl_handle;
	  //CURLcode res;

  	  curl_global_init(CURL_GLOBAL_ALL);

	  curl_handle = curl_easy_init();
	  curl_easy_setopt(curl_handle,CURLOPT_URL,url);

     
      curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
      curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS);

	  int curl_code = curl_easy_perform(curl_handle);

	  http_code = 0;

	  curl_easy_getinfo(curl_handle, CURLINFO_HTTP_CODE, &http_code);
	 
	  curl_easy_cleanup(curl_handle);

	  curl_global_cleanup();

I been running this code inside BOINC, which disables libcurl terminal output and 10 times faster than this libcurl program alone....

Any idea ?


Thanks,

-Kun
 
Old 10-28-2009, 01:10 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,808

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable bootloader output message wuke Linux - Embedded & Single-board computer 2 04-29-2009 02:56 AM
disable terminal desktop turning off leonids665 Linux - Software 1 02-16-2008 06:48 PM
Redirect terminal output to file AND terminal shan Linux - General 3 09-29-2006 08:36 AM
Disable errors output to console Tushar Pednekar Linux - Software 2 07-17-2006 08:10 PM
How to disable console output kamel Programming 2 06-02-2004 01:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration