libcurl

Dealing with library dependencies on linux

删除回忆录丶 提交于 2019-12-21 14:51:08
问题 I am using libcurl in my project and it depends on openssl and bunch of other .so in runtime. This dependency is kind of pain in the ass, since different distributives/versions may contain different openssl versions. For example I am experiencing problems running on Ubuntu 11.10 if I compiled my app on Ubuntu 9.10. I am seeing two options how to solve this but none of them aren't good enough for my case: package my app and let package manager solve this sort of stuff link all deps statically

How do I CURL www.google.com - it keeps redirecting me to .co.uk

时间秒杀一切 提交于 2019-12-21 07:20:10
问题 I am using CURL to check for the existence of a URL (HEAD request) but when I test it with www.google.com , it redirects me to www.google.co.uk - probably because my server is UK-based. Is there a way you can stop this from happening? I don't want to remove the CURLOPT_FOLLOWLOCATION option as this is useful for 301 redirects etc. Part of my code is below; $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,

How do I CURL www.google.com - it keeps redirecting me to .co.uk

匆匆过客 提交于 2019-12-21 07:20:03
问题 I am using CURL to check for the existence of a URL (HEAD request) but when I test it with www.google.com , it redirects me to www.google.co.uk - probably because my server is UK-based. Is there a way you can stop this from happening? I don't want to remove the CURLOPT_FOLLOWLOCATION option as this is useful for 301 redirects etc. Part of my code is below; $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,

Problems building libcurl 7.21.2 on Ubuntu 11.10 (Hiphop)

纵饮孤独 提交于 2019-12-21 05:51:44
问题 I'm following this Hiphop installation guide: https://github.com/facebook/hiphop-php/wiki/Building-and-installing-on-ubuntu-10.10 And when I try to make it, I get the following errors: ../lib/.libs/libcurl.so: undefined reference to `SSLv2_client_method' I've found this Server Fault ticket, but the merged change from the linked Github pull request didn't seem to fix the problem. https://superuser.com/questions/339932/compiling-curl-with-hiphop-for-php-patch I'm running Ubuntu 11.10, but I

decompression gzip data with curl

我是研究僧i 提交于 2019-12-20 12:38:24
问题 I added curl_easy_setopt(client, CURLOPT_ENCODING, "gzip"); to my code. I expected curl to cause the server to send compressed data AND to decompress it. Actually i see in HTTP header that the data is compressed (Vary: Accept-Encoding Content-Encoding: gzip), but curl doesn't decompress it for me. Is there an additional command I should use for this? 回答1: Note that this option has been renamed to CURLOPT_ACCEPT_ENCODING. As stated by the documentation: Sets the contents of the Accept-Encoding

What's wrong with my PHP curl request, please help .. I'm not getting any data back [closed]

喜夏-厌秋 提交于 2019-12-20 07:44:19
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . It says the browser sent a request the server could not understand .. I don't exactly understand what went wrong in my PHP code. Can someone please help

Weird things with libCurl and OpenSSL

别等时光非礼了梦想. 提交于 2019-12-20 06:12:06
问题 It's me again. I just can't understand, why it goes that way! I downloaded compiled static libs of OpenSSL, from here, this link is on the official cUrl site in Download page. I downloaded Zlib and compiled them, then I compiled libcurl with mingw32-make mingw32-ssl-zlib I changed in all makefile.m32 pathes to the Zlib and OpenSSL files. All went fine, I recieved libcurl.a and libcurldll.a. I added into lib folder of my project libcurl.a and libeay32.a, libssleay32.a and libz.a. I built

Sending an image to ftp server from gchar buffer (libcurl)

我与影子孤独终老i 提交于 2019-12-20 03:23:31
问题 I'm developing a linux app programmed in C which processes gdk pixbuf images and then should send them to a remote server via ftp (libcurl). The images are saved into a gchar buffer with gdk_pixbuf_save_to_buffer. The problem is I don't know how to use the data in this buffer in conjunction with libcurl read callback function to send the image properly to the remote server. All my attempts so far have produced random bytes into the resulting file. There is an example of the libcurl read

How do I install curl with ares enabled

ε祈祈猫儿з 提交于 2019-12-19 18:38:04
问题 I have curl installed on the latest ubuntu via apt-get and that works fine, however I've been reading about the blocking nature of the DNS lookups and discovered that it's slowing down my app. I've done apt-get install libc-ares2 but I'm not sure how to tell curl to use that library when doing a lookup. I posted this question to AskUbuntu but was told it was probably better here.. 回答1: I think the AskUbuntu are thinking that this is a programming question and not a configuration question. The

How do you properly install libcurl for use in visual studio 2017?

℡╲_俬逩灬. 提交于 2019-12-19 17:57:10
问题 I am just starting out in c++ and cannot figure out how to add libraries, in particular libcurl. I tried a bunch of tutorials but most were for 2013/10 or didn't work. Can anyone please explain (Preferably in standard/non technical English) how I can add the library? I have already tried adding it in the include section of the program and in the additional dependencies menu. Note this is a re-post I asked virtually the same question around 3 days ago to which I received no replies. Not sure