Jump to content

cURL UDF - a UDF for transferring data with URL syntax

Recommended Posts

I tried downloading this -

I couldn't find the dlls on the website or in the zip file - tried googling them and found them on this site -


Tried running the examples and got these errors -

C:Program Files (x86)AutoIt3Includecurl.au3(411,79) : WARNING: $hCurlHandle: possibly used before declaration.
        DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle,
U:...Test.au3(33,127) : ERROR: syntax error
$out = cURL_easy("cookie.txt", "<a href='http://www.autoitscript.com/' class='bbc_url' title=''>http://www.autoitscript.com/"</

Func CurlDown()
#include <cURL.au3>
; Initialise cURL
; Connect and get index page
$out = cURL_easy("cookie.txt", "<a href='http://www.autoitscript.com/' class='bbc_url' title=''>http://www.autoitscript.com/"</a>, "")
; output the HTTP response to the console
; Clean up cURL

Any ideas what I'm doing wrong?

Link to post
Share on other sites
  • 1 year later...
  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Greetings everyone,   I'd like to start my own cURL UDF, with a focus on a nice and simple syntax. There are many other cURL samples in the forum, though I found them too difficult to unders

Hi all, I haven't posted updates to the AutoIT forums for a while now. But I needed to improve my cURL UDF to support HTTP headers and response codes. See my latest update (v0.3). 

Posted Images

Hi all,

I haven't posted updates to the AutoIT forums for a while now.

But I needed to improve my cURL UDF to support HTTP headers and response codes.

See my latest update (v0.3). 

Sorry I know the UDF was at v0.5, but somehow I've dropped back two versions.  May have regressed the UDF slightly, but progressed in other areas ;-)

Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia
Link to post
Share on other sites

Is DLLs libeay32.dll, libssh2.dll included in resent versions like 7.46 ... 7.48 ? i see only libcurl.dll in package for some reason...  Is those dll's really needed? - ward's UDF working without them (but no x64 support...)

Link to post
Share on other sites
  • 8 months later...

my script is

Local $lgtA = $CoordinatePartenza[2]
Local $lgtB = $CoordinateArrivo[2]
Local $url = "https://maps.googleapis.com/maps/api/distancematrix/xml?origins=" & $lgtA[0] & "+" & $lgtA[1] & "&destinations=" & $lgtB[0] & "+" & $lgtB[1] & "&mode=driving&language=it-IT&key=" & $ApiGoogleKey

I have this error :

! Unknown SSL protocol error in connection to maps.googleapis.com:443 

I do not understand why.

Link to post
Share on other sites
  • 3 years later...
  • 3 weeks later...
  • 2 months later...

Hello World,

i am looking to a version which handles the SSL OPTION NATIVE CA, as it has been included in the 7.71.0 Version of LibCurl.
Any Ideas how to incorporate the possibility to use the easy set option interface for that?


Tell libcurl to use the operating system's native CA store for certificate verification. Works only on Windows when built to use OpenSSL. This option is experimental and behavior is subject to change. (Added in 7.71.0)


Link to post
Share on other sites
  • 2 weeks later...
  • 4 months later...

This should help you debug the error...

$hCurlHandle = DllCall($hDll_LibCurl, "ptr:cdecl", "curl_easy_init")
If @error Or Not IsArray($hCurlHandle) Then Return SetError(1, 0, 0)
$hCurlHandle = $hCurlHandle[0]



I just noticed that you're using 64bit dll's.

Did you change the required lines in the UDF to use them?


Edited by ripdad

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Link to post
Share on other sites
On 1/19/2021 at 7:47 AM, paulpmeier said:


Copy the files libcrypto-1_1-x64.dll, libssl-1_1-x64.dll and libcurl-x64.dll into your cURL.au3 directory.

In cURL.au3 replace in line 125 libcurl.dll with libcurl-x64.dll.


I made these changes, do I need to change anything else in order to use 64bit dll's ? :)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...