libcurl

Fill out a form automatically using curl and php

我的未来我决定 提交于 2020-01-06 02:49:09
问题 I am trying to write a script that fills out forms automatically and then automatically presses the submit button. I have read that you can use curl to post HTTP requests, but what do you do when the form handles the post request with JavaScript, like the code below? <form name="myform" action="javascript:void(0)" method="POST" onsubmit="return fancy_function(this)"> 回答1: Based off your answer to the comments above, what you want to do is not "fill out the form" with curl, but rather post the

How do I get RCurl to connect to POST SSL on OS X Yosemite?

被刻印的时光 ゝ 提交于 2020-01-05 10:32:38
问题 Since upgrading to OS X Yosemite 10.10.2, I have been unable to use RCurl to send POSTs via SSL. The error message I get is: Error in function (type, msg, asError = TRUE) : SSLRead() return error -9806 This strongly resembles the curl error here: osx 10.10 Curl POST to HTTPS url gives SSLRead() error So I ran the instructions to install libcurl via home-brew, per the answers on that question, but I cannot figure out how to link RCurl to the new libcurl. curl-config still returns the old

Download a file from an FTP using Curl with PHP

谁都会走 提交于 2020-01-05 07:01:47
问题 I'm trying to download a file from an FTP server using Curl. I can paste the URL into my browser and it downloads fine. The problem is that with Curl and PHP, I believe the FTP server is doing a redirect and Curl won't follow. I get the error message, "Server denied you to change to the given directory". EDIT: I had %2f in the code and deleted it. That was from a prior test. My code is: $curl = curl_init(); $file = fopen("temp.zip", 'w'); curl_setopt($curl, CURLOPT_URL, "ftp://idx.living.net

Calling any cURL function results in “entry point not found” when executing the program

非 Y 不嫁゛ 提交于 2020-01-04 06:04:56
问题 In Visual Studio 2012 (SP4) if I create a new Windows EXE solution, use the Nuget command line to "install-package curl", build the solution, the program executes correctly and displays the simple window as expected. If I add a call to curl_version() to the code (meaning the cURL, SSL, etc... DLLs are now referenced) - I get an error from Windows saying... MyProgram.EXE - Entry Point Not Found The procedure entry point CreateFile2 could not be located in the dynamic link library KERNEL32.DLL.

Calling any cURL function results in “entry point not found” when executing the program

孤者浪人 提交于 2020-01-04 06:04:28
问题 In Visual Studio 2012 (SP4) if I create a new Windows EXE solution, use the Nuget command line to "install-package curl", build the solution, the program executes correctly and displays the simple window as expected. If I add a call to curl_version() to the code (meaning the cURL, SSL, etc... DLLs are now referenced) - I get an error from Windows saying... MyProgram.EXE - Entry Point Not Found The procedure entry point CreateFile2 could not be located in the dynamic link library KERNEL32.DLL.

curl_easy_perform crashes when the URL is not correct

僤鯓⒐⒋嵵緔 提交于 2020-01-04 01:14:25
问题 I have a problem trying to download files using libcurl . The program works with multiple threads, every thread that needs to download a file creates a libcurl handle to work with. When the URL is correct everything works, but if there is a mistake in the URL the program crashes. In debug mode, if the URL is not correct curl_easy_perform returns an error connection code and the program works. In contrast, it crashes in release. How could I fix this error? Here is the code that I use to

cURL couldn't resolve host How to deal with that?

空扰寡人 提交于 2020-01-03 05:04:28
问题 I am working on a C++ program, which uses cURL lib. When I try to connect to URL, that is incorrect or the page is down I get following error : getaddrinfo(3) failed for www.wp.pl#:80 Couldn't resolve host 'www.wp.pl#' And the program terminates. And that is the problem, because I it to go futher and connect to other pages. I just won't parse and analyze the broken page I don't want to end my program after come across such one. I posted similar topic, but it contained only snippets of code so

Xcode is not using 'Header Search Path' to find my header files

孤人 提交于 2020-01-02 19:28:29
问题 I have just downloaded and compiled curl. In my /usr/include folder I can see folder, 'curl' and I can see that I do, indeed, have '/usr/include/curl/curl.h'. However I cannot talk XCode into looking there when compiling. #import <curl/curl.h> In my target's properties I have included '/usr/include' to 'Header Search Paths'. The build continues to fail stating that it cannot find 'curl/curl.h' Am I not adding my search paths correctly? Thanks 回答1: User Header Search Paths - searched for

How to simulate that JavaScript is enabled with PHP Curl?

╄→尐↘猪︶ㄣ 提交于 2020-01-02 15:01:17
问题 I want to parse the HTML code from a webpage with PHP Curl, but there is an error msg that I can't access the site without JavaScript. Can I enable JavaScript with PHP Curl? 回答1: JavaScript is executed by a browser; cURL does not have a JavaScript parser, therefore can not execute it. Because the website is expecting something to tell it that javascript is enabled, you'll need to use a tool that can execute the webpage through an actual browser to give you the html. 回答2: While a TERRIBLE idea

pycurl install :( already have min. libcurl version

时光毁灭记忆、已成空白 提交于 2020-01-02 08:45:30
问题 I'm running python 2.6 on an Intel Mac OS X 10.5 I'm trying to install pycurl 7.16.2.1 (as recommended here http://curl.haxx.se/mail/curlpython-2009-03/0009.html), but for some reason, the installation sees my libcurl 7.16.3, yet it still insist I install 7.16.2 or greater (doesn't 7.16.3 satisfy that?) Here's the error output: Running pycurl-7.16.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-3emZIB/pycurl-7.16.2.1/egg-dist-tmp-K10rbP Using curl-config (libcurl 7.16.3) src/pycurl.c