Jump to content

Search the Community

Showing results for tags 'download'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

  1. Here is a UDF geared at making libcurl more accessible to AutoIt users. Homepage of curl and libcurl: http://curl.haxx.se Technical overview: libcurl is a free and easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos), file transfer resume, http proxy tunneling and more! (from http://curl.haxx.se/libcurl/) Features: This UDF wraps the "easy" interface of libcurl. Below is a complete list of the functions currently available in this library: ; #CURRENT# ===================================================================================================================== ;_curl_easy_escape ;_curl_easy_init ;_curl_easy_cleanup ;_curl_easy_duphandle ;_curl_easy_getinfo ;_curl_easy_pause ;_curl_easy_perform ;_curl_easy_recv ;_curl_easy_reset ;_curl_easy_send ;_curl_easy_setopt ;_curl_easy_strerror ;_curl_easy_unescape ;_curl_formadd ;_curl_formfree ;_curl_free ;_curl_getdate ;_curl_global_cleanup ;_curl_global_init ;_curl_global_init_mem ;_curl_slist_append ;_curl_slist_free_all ;_curl_version ;_curl_version_info ; =============================================================================================================================== Code: libcURLConstants.au3 #include-once ; libcURLConstants.au3, generated from curl.h of libcurl 7.25.0 on 04/06/2012 05:11:23 GMT for use with "libcURL.au3", the libcurl wrapper UDF by smartee. ; possible error codes from all sorts of curl functions Global Const $CURLE_OK = 0 Global Const $CURLE_UNSUPPORTED_PROTOCOL = 1 Global Const $CURLE_FAILED_INIT = 2 Global Const $CURLE_URL_MALFORMAT = 3 Global Const $CURLE_NOT_BUILT_IN = 4 Global Const $CURLE_COULDNT_RESOLVE_PROXY = 5 Global Const $CURLE_COULDNT_RESOLVE_HOST = 6 Global Const $CURLE_COULDNT_CONNECT = 7 Global Const $CURLE_FTP_WEIRD_SERVER_REPLY = 8 Global Const $CURLE_REMOTE_ACCESS_DENIED = 9 Global Const $CURLE_FTP_ACCEPT_FAILED = 10 Global Const $CURLE_FTP_WEIRD_PASS_REPLY = 11 Global Const $CURLE_FTP_ACCEPT_TIMEOUT = 12 Global Const $CURLE_FTP_WEIRD_PASV_REPLY = 13 Global Const $CURLE_FTP_WEIRD_227_FORMAT = 14 Global Const $CURLE_FTP_CANT_GET_HOST = 15 Global Const $CURLE_OBSOLETE16 = 16 Global Const $CURLE_FTP_COULDNT_SET_TYPE = 17 Global Const $CURLE_PARTIAL_FILE = 18 Global Const $CURLE_FTP_COULDNT_RETR_FILE = 19 Global Const $CURLE_OBSOLETE20 = 20 Global Const $CURLE_QUOTE_ERROR = 21 Global Const $CURLE_HTTP_RETURNED_ERROR = 22 Global Const $CURLE_WRITE_ERROR = 23 Global Const $CURLE_OBSOLETE24 = 24 Global Const $CURLE_UPLOAD_FAILED = 25 Global Const $CURLE_READ_ERROR = 26 Global Const $CURLE_OUT_OF_MEMORY = 27 Global Const $CURLE_OPERATION_TIMEDOUT = 28 Global Const $CURLE_OBSOLETE29 = 29 Global Const $CURLE_FTP_PORT_FAILED = 30 Global Const $CURLE_FTP_COULDNT_USE_REST = 31 Global Const $CURLE_OBSOLETE32 = 32 Global Const $CURLE_RANGE_ERROR = 33 Global Const $CURLE_HTTP_POST_ERROR = 34 Global Const $CURLE_SSL_CONNECT_ERROR = 35 Global Const $CURLE_BAD_DOWNLOAD_RESUME = 36 Global Const $CURLE_FILE_COULDNT_READ_FILE = 37 Global Const $CURLE_LDAP_CANNOT_BIND = 38 Global Const $CURLE_LDAP_SEARCH_FAILED = 39 Global Const $CURLE_OBSOLETE40 = 40 Global Const $CURLE_FUNCTION_NOT_FOUND = 41 Global Const $CURLE_ABORTED_BY_CALLBACK = 42 Global Const $CURLE_BAD_FUNCTION_ARGUMENT = 43 Global Const $CURLE_OBSOLETE44 = 44 Global Const $CURLE_INTERFACE_FAILED = 45 Global Const $CURLE_OBSOLETE46 = 46 Global Const $CURLE_TOO_MANY_REDIRECTS = 47 Global Const $CURLE_UNKNOWN_OPTION = 48 Global Const $CURLE_TELNET_OPTION_SYNTAX = 49 Global Const $CURLE_OBSOLETE50 = 50 Global Const $CURLE_PEER_FAILED_VERIFICATION = 51 Global Const $CURLE_GOT_NOTHING = 52 Global Const $CURLE_SSL_ENGINE_NOTFOUND = 53 Global Const $CURLE_SSL_ENGINE_SETFAILED = 54 Global Const $CURLE_SEND_ERROR = 55 Global Const $CURLE_RECV_ERROR = 56 Global Const $CURLE_OBSOLETE57 = 57 Global Const $CURLE_SSL_CERTPROBLEM = 58 Global Const $CURLE_SSL_CIPHER = 59 Global Const $CURLE_SSL_CACERT = 60 Global Const $CURLE_BAD_CONTENT_ENCODING = 61 Global Const $CURLE_LDAP_INVALID_URL = 62 Global Const $CURLE_FILESIZE_EXCEEDED = 63 Global Const $CURLE_USE_SSL_FAILED = 64 Global Const $CURLE_SEND_FAIL_REWIND = 65 Global Const $CURLE_SSL_ENGINE_INITFAILED = 66 Global Const $CURLE_LOGIN_DENIED = 67 Global Const $CURLE_TFTP_NOTFOUND = 68 Global Const $CURLE_TFTP_PERM = 69 Global Const $CURLE_REMOTE_DISK_FULL = 70 Global Const $CURLE_TFTP_ILLEGAL = 71 Global Const $CURLE_TFTP_UNKNOWNID = 72 Global Const $CURLE_REMOTE_FILE_EXISTS = 73 Global Const $CURLE_TFTP_NOSUCHUSER = 74 Global Const $CURLE_CONV_FAILED = 75 Global Const $CURLE_CONV_REQD = 76 Global Const $CURLE_SSL_CACERT_BADFILE = 77 Global Const $CURLE_REMOTE_FILE_NOT_FOUND = 78 Global Const $CURLE_SSH = 79 Global Const $CURLE_SSL_SHUTDOWN_FAILED = 80 Global Const $CURLE_AGAIN = 81 Global Const $CURLE_SSL_CRL_BADFILE = 82 Global Const $CURLE_SSL_ISSUER_ERROR = 83 Global Const $CURLE_FTP_PRET_FAILED = 84 Global Const $CURLE_RTSP_CSEQ_ERROR = 85 Global Const $CURLE_RTSP_SESSION_ERROR = 86 Global Const $CURLE_FTP_BAD_FILE_LIST = 87 Global Const $CURLE_CHUNK_FAILED = 88 ; minimum size of error buffer to be used with $CURLOPT_ERRORBUFFER Global Const $CURL_ERROR_SIZE = 256 ; $CURLPROTO_ constants are for the $CURLOPT_*PROTOCOLS options Global Const $CURLPROTO_HTTP = BitShift(1, 0) Global Const $CURLPROTO_HTTPS = BitShift(1, -1) Global Const $CURLPROTO_FTP = BitShift(1, -2) Global Const $CURLPROTO_FTPS = BitShift(1, -3) Global Const $CURLPROTO_SCP = BitShift(1, -4) Global Const $CURLPROTO_SFTP = BitShift(1, -5) Global Const $CURLPROTO_TELNET = BitShift(1, -6) Global Const $CURLPROTO_LDAP = BitShift(1, -7) Global Const $CURLPROTO_LDAPS = BitShift(1, -8) Global Const $CURLPROTO_DICT = BitShift(1, -9) Global Const $CURLPROTO_FILE = BitShift(1, -10) Global Const $CURLPROTO_TFTP = BitShift(1, -11) Global Const $CURLPROTO_IMAP = BitShift(1, -12) Global Const $CURLPROTO_IMAPS = BitShift(1, -13) Global Const $CURLPROTO_POP3 = BitShift(1, -14) Global Const $CURLPROTO_POP3S = BitShift(1, -15) Global Const $CURLPROTO_SMTP = BitShift(1, -16) Global Const $CURLPROTO_SMTPS = BitShift(1, -17) Global Const $CURLPROTO_RTSP = BitShift(1, -18) Global Const $CURLPROTO_RTMP = BitShift(1, -19) Global Const $CURLPROTO_RTMPT = BitShift(1, -20) Global Const $CURLPROTO_RTMPE = BitShift(1, -21) Global Const $CURLPROTO_RTMPTE = BitShift(1, -22) Global Const $CURLPROTO_RTMPS = BitShift(1, -23) Global Const $CURLPROTO_RTMPTS = BitShift(1, -24) Global Const $CURLPROTO_GOPHER = BitShift(1, -25) Global Const $CURLPROTO_ALL = BitNOT(0) ; $CURLOPTTYPE_[what] constants Global Const $CURLOPTTYPE_LONG = 0 Global Const $CURLOPTTYPE_OBJECTPOINT = 10000 Global Const $CURLOPTTYPE_FUNCTIONPOINT = 20000 Global Const $CURLOPTTYPE_OFF_T = 30000 ; $CURLOPT_[what] constants, to be used with _curl_easy_setopt() Global Const $CURLOPT_FILE = $CURLOPTTYPE_OBJECTPOINT + 1 Global Const $CURLOPT_URL = $CURLOPTTYPE_OBJECTPOINT + 2 Global Const $CURLOPT_PORT = $CURLOPTTYPE_LONG + 3 Global Const $CURLOPT_PROXY = $CURLOPTTYPE_OBJECTPOINT + 4 Global Const $CURLOPT_USERPWD = $CURLOPTTYPE_OBJECTPOINT + 5 Global Const $CURLOPT_PROXYUSERPWD = $CURLOPTTYPE_OBJECTPOINT + 6 Global Const $CURLOPT_RANGE = $CURLOPTTYPE_OBJECTPOINT + 7 Global Const $CURLOPT_INFILE = $CURLOPTTYPE_OBJECTPOINT + 9 Global Const $CURLOPT_ERRORBUFFER = $CURLOPTTYPE_OBJECTPOINT + 10 Global Const $CURLOPT_WRITEFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 11 Global Const $CURLOPT_READFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 12 Global Const $CURLOPT_TIMEOUT = $CURLOPTTYPE_LONG + 13 Global Const $CURLOPT_INFILESIZE = $CURLOPTTYPE_LONG + 14 Global Const $CURLOPT_POSTFIELDS = $CURLOPTTYPE_OBJECTPOINT + 15 Global Const $CURLOPT_REFERER = $CURLOPTTYPE_OBJECTPOINT + 16 Global Const $CURLOPT_FTPPORT = $CURLOPTTYPE_OBJECTPOINT + 17 Global Const $CURLOPT_USERAGENT = $CURLOPTTYPE_OBJECTPOINT + 18 Global Const $CURLOPT_LOW_SPEED_LIMIT = $CURLOPTTYPE_LONG + 19 Global Const $CURLOPT_LOW_SPEED_TIME = $CURLOPTTYPE_LONG + 20 Global Const $CURLOPT_RESUME_FROM = $CURLOPTTYPE_LONG + 21 Global Const $CURLOPT_COOKIE = $CURLOPTTYPE_OBJECTPOINT + 22 Global Const $CURLOPT_HTTPHEADER = $CURLOPTTYPE_OBJECTPOINT + 23 Global Const $CURLOPT_HTTPPOST = $CURLOPTTYPE_OBJECTPOINT + 24 Global Const $CURLOPT_SSLCERT = $CURLOPTTYPE_OBJECTPOINT + 25 Global Const $CURLOPT_KEYPASSWD = $CURLOPTTYPE_OBJECTPOINT + 26 Global Const $CURLOPT_CRLF = $CURLOPTTYPE_LONG + 27 Global Const $CURLOPT_QUOTE = $CURLOPTTYPE_OBJECTPOINT + 28 Global Const $CURLOPT_WRITEHEADER = $CURLOPTTYPE_OBJECTPOINT + 29 Global Const $CURLOPT_COOKIEFILE = $CURLOPTTYPE_OBJECTPOINT + 31 Global Const $CURLOPT_SSLVERSION = $CURLOPTTYPE_LONG + 32 Global Const $CURLOPT_TIMECONDITION = $CURLOPTTYPE_LONG + 33 Global Const $CURLOPT_TIMEVALUE = $CURLOPTTYPE_LONG + 34 Global Const $CURLOPT_CUSTOMREQUEST = $CURLOPTTYPE_OBJECTPOINT + 36 Global Const $CURLOPT_STDERR = $CURLOPTTYPE_OBJECTPOINT + 37 Global Const $CURLOPT_POSTQUOTE = $CURLOPTTYPE_OBJECTPOINT + 39 Global Const $CURLOPT_WRITEINFO = $CURLOPTTYPE_OBJECTPOINT + 40 Global Const $CURLOPT_VERBOSE = $CURLOPTTYPE_LONG + 41 Global Const $CURLOPT_HEADER = $CURLOPTTYPE_LONG + 42 Global Const $CURLOPT_NOPROGRESS = $CURLOPTTYPE_LONG + 43 Global Const $CURLOPT_NOBODY = $CURLOPTTYPE_LONG + 44 Global Const $CURLOPT_FAILONERROR = $CURLOPTTYPE_LONG + 45 Global Const $CURLOPT_UPLOAD = $CURLOPTTYPE_LONG + 46 Global Const $CURLOPT_POST = $CURLOPTTYPE_LONG + 47 Global Const $CURLOPT_DIRLISTONLY = $CURLOPTTYPE_LONG + 48 Global Const $CURLOPT_APPEND = $CURLOPTTYPE_LONG + 50 Global Const $CURLOPT_NETRC = $CURLOPTTYPE_LONG + 51 Global Const $CURLOPT_FOLLOWLOCATION = $CURLOPTTYPE_LONG + 52 Global Const $CURLOPT_TRANSFERTEXT = $CURLOPTTYPE_LONG + 53 Global Const $CURLOPT_PUT = $CURLOPTTYPE_LONG + 54 Global Const $CURLOPT_PROGRESSFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 56 Global Const $CURLOPT_PROGRESSDATA = $CURLOPTTYPE_OBJECTPOINT + 57 Global Const $CURLOPT_AUTOREFERER = $CURLOPTTYPE_LONG + 58 Global Const $CURLOPT_PROXYPORT = $CURLOPTTYPE_LONG + 59 Global Const $CURLOPT_POSTFIELDSIZE = $CURLOPTTYPE_LONG + 60 Global Const $CURLOPT_HTTPPROXYTUNNEL = $CURLOPTTYPE_LONG + 61 Global Const $CURLOPT_INTERFACE = $CURLOPTTYPE_OBJECTPOINT + 62 Global Const $CURLOPT_KRBLEVEL = $CURLOPTTYPE_OBJECTPOINT + 63 Global Const $CURLOPT_SSL_VERIFYPEER = $CURLOPTTYPE_LONG + 64 Global Const $CURLOPT_CAINFO = $CURLOPTTYPE_OBJECTPOINT + 65 Global Const $CURLOPT_MAXREDIRS = $CURLOPTTYPE_LONG + 68 Global Const $CURLOPT_FILETIME = $CURLOPTTYPE_LONG + 69 Global Const $CURLOPT_TELNETOPTIONS = $CURLOPTTYPE_OBJECTPOINT + 70 Global Const $CURLOPT_MAXCONNECTS = $CURLOPTTYPE_LONG + 71 Global Const $CURLOPT_CLOSEPOLICY = $CURLOPTTYPE_LONG + 72 Global Const $CURLOPT_FRESH_CONNECT = $CURLOPTTYPE_LONG + 74 Global Const $CURLOPT_FORBID_REUSE = $CURLOPTTYPE_LONG + 75 Global Const $CURLOPT_RANDOM_FILE = $CURLOPTTYPE_OBJECTPOINT + 76 Global Const $CURLOPT_EGDSOCKET = $CURLOPTTYPE_OBJECTPOINT + 77 Global Const $CURLOPT_CONNECTTIMEOUT = $CURLOPTTYPE_LONG + 78 Global Const $CURLOPT_HEADERFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 79 Global Const $CURLOPT_HTTPGET = $CURLOPTTYPE_LONG + 80 Global Const $CURLOPT_SSL_VERIFYHOST = $CURLOPTTYPE_LONG + 81 Global Const $CURLOPT_COOKIEJAR = $CURLOPTTYPE_OBJECTPOINT + 82 Global Const $CURLOPT_SSL_CIPHER_LIST = $CURLOPTTYPE_OBJECTPOINT + 83 Global Const $CURLOPT_HTTP_VERSION = $CURLOPTTYPE_LONG + 84 Global Const $CURLOPT_FTP_USE_EPSV = $CURLOPTTYPE_LONG + 85 Global Const $CURLOPT_SSLCERTTYPE = $CURLOPTTYPE_OBJECTPOINT + 86 Global Const $CURLOPT_SSLKEY = $CURLOPTTYPE_OBJECTPOINT + 87 Global Const $CURLOPT_SSLKEYTYPE = $CURLOPTTYPE_OBJECTPOINT + 88 Global Const $CURLOPT_SSLENGINE = $CURLOPTTYPE_OBJECTPOINT + 89 Global Const $CURLOPT_SSLENGINE_DEFAULT = $CURLOPTTYPE_LONG + 90 Global Const $CURLOPT_DNS_USE_GLOBAL_CACHE = $CURLOPTTYPE_LONG + 91 Global Const $CURLOPT_DNS_CACHE_TIMEOUT = $CURLOPTTYPE_LONG + 92 Global Const $CURLOPT_PREQUOTE = $CURLOPTTYPE_OBJECTPOINT + 93 Global Const $CURLOPT_DEBUGFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 94 Global Const $CURLOPT_DEBUGDATA = $CURLOPTTYPE_OBJECTPOINT + 95 Global Const $CURLOPT_COOKIESESSION = $CURLOPTTYPE_LONG + 96 Global Const $CURLOPT_CAPATH = $CURLOPTTYPE_OBJECTPOINT + 97 Global Const $CURLOPT_BUFFERSIZE = $CURLOPTTYPE_LONG + 98 Global Const $CURLOPT_NOSIGNAL = $CURLOPTTYPE_LONG + 99 Global Const $CURLOPT_SHARE = $CURLOPTTYPE_OBJECTPOINT + 100 Global Const $CURLOPT_PROXYTYPE = $CURLOPTTYPE_LONG + 101 Global Const $CURLOPT_ACCEPT_ENCODING = $CURLOPTTYPE_OBJECTPOINT + 102 Global Const $CURLOPT_PRIVATE = $CURLOPTTYPE_OBJECTPOINT + 103 Global Const $CURLOPT_HTTP200ALIASES = $CURLOPTTYPE_OBJECTPOINT + 104 Global Const $CURLOPT_UNRESTRICTED_AUTH = $CURLOPTTYPE_LONG + 105 Global Const $CURLOPT_FTP_USE_EPRT = $CURLOPTTYPE_LONG + 106 Global Const $CURLOPT_HTTPAUTH = $CURLOPTTYPE_LONG + 107 Global Const $CURLOPT_SSL_CTX_FUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 108 Global Const $CURLOPT_SSL_CTX_DATA = $CURLOPTTYPE_OBJECTPOINT + 109 Global Const $CURLOPT_FTP_CREATE_MISSING_DIRS = $CURLOPTTYPE_LONG + 110 Global Const $CURLOPT_PROXYAUTH = $CURLOPTTYPE_LONG + 111 Global Const $CURLOPT_FTP_RESPONSE_TIMEOUT = $CURLOPTTYPE_LONG + 112 Global Const $CURLOPT_IPRESOLVE = $CURLOPTTYPE_LONG + 113 Global Const $CURLOPT_MAXFILESIZE = $CURLOPTTYPE_LONG + 114 Global Const $CURLOPT_INFILESIZE_LARGE = $CURLOPTTYPE_OFF_T + 115 Global Const $CURLOPT_RESUME_FROM_LARGE = $CURLOPTTYPE_OFF_T + 116 Global Const $CURLOPT_MAXFILESIZE_LARGE = $CURLOPTTYPE_OFF_T + 117 Global Const $CURLOPT_NETRC_FILE = $CURLOPTTYPE_OBJECTPOINT + 118 Global Const $CURLOPT_USE_SSL = $CURLOPTTYPE_LONG + 119 Global Const $CURLOPT_POSTFIELDSIZE_LARGE = $CURLOPTTYPE_OFF_T + 120 Global Const $CURLOPT_TCP_NODELAY = $CURLOPTTYPE_LONG + 121 Global Const $CURLOPT_FTPSSLAUTH = $CURLOPTTYPE_LONG + 129 Global Const $CURLOPT_IOCTLFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 130 Global Const $CURLOPT_IOCTLDATA = $CURLOPTTYPE_OBJECTPOINT + 131 Global Const $CURLOPT_FTP_ACCOUNT = $CURLOPTTYPE_OBJECTPOINT + 134 Global Const $CURLOPT_COOKIELIST = $CURLOPTTYPE_OBJECTPOINT + 135 Global Const $CURLOPT_IGNORE_CONTENT_LENGTH = $CURLOPTTYPE_LONG + 136 Global Const $CURLOPT_FTP_SKIP_PASV_IP = $CURLOPTTYPE_LONG + 137 Global Const $CURLOPT_FTP_FILEMETHOD = $CURLOPTTYPE_LONG + 138 Global Const $CURLOPT_LOCALPORT = $CURLOPTTYPE_LONG + 139 Global Const $CURLOPT_LOCALPORTRANGE = $CURLOPTTYPE_LONG + 140 Global Const $CURLOPT_CONNECT_ONLY = $CURLOPTTYPE_LONG + 141 Global Const $CURLOPT_CONV_FROM_NETWORK_FUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 142 Global Const $CURLOPT_CONV_TO_NETWORK_FUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 143 Global Const $CURLOPT_CONV_FROM_UTF8_FUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 144 Global Const $CURLOPT_MAX_SEND_SPEED_LARGE = $CURLOPTTYPE_OFF_T + 145 Global Const $CURLOPT_MAX_RECV_SPEED_LARGE = $CURLOPTTYPE_OFF_T + 146 Global Const $CURLOPT_FTP_ALTERNATIVE_TO_USER = $CURLOPTTYPE_OBJECTPOINT + 147 Global Const $CURLOPT_SOCKOPTFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 148 Global Const $CURLOPT_SOCKOPTDATA = $CURLOPTTYPE_OBJECTPOINT + 149 Global Const $CURLOPT_SSL_SESSIONID_CACHE = $CURLOPTTYPE_LONG + 150 Global Const $CURLOPT_SSH_AUTH_TYPES = $CURLOPTTYPE_LONG + 151 Global Const $CURLOPT_SSH_PUBLIC_KEYFILE = $CURLOPTTYPE_OBJECTPOINT + 152 Global Const $CURLOPT_SSH_PRIVATE_KEYFILE = $CURLOPTTYPE_OBJECTPOINT + 153 Global Const $CURLOPT_FTP_SSL_CCC = $CURLOPTTYPE_LONG + 154 Global Const $CURLOPT_TIMEOUT_MS = $CURLOPTTYPE_LONG + 155 Global Const $CURLOPT_CONNECTTIMEOUT_MS = $CURLOPTTYPE_LONG + 156 Global Const $CURLOPT_HTTP_TRANSFER_DECODING = $CURLOPTTYPE_LONG + 157 Global Const $CURLOPT_HTTP_CONTENT_DECODING = $CURLOPTTYPE_LONG + 158 Global Const $CURLOPT_NEW_FILE_PERMS = $CURLOPTTYPE_LONG + 159 Global Const $CURLOPT_NEW_DIRECTORY_PERMS = $CURLOPTTYPE_LONG + 160 Global Const $CURLOPT_POSTREDIR = $CURLOPTTYPE_LONG + 161 Global Const $CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = $CURLOPTTYPE_OBJECTPOINT + 162 Global Const $CURLOPT_OPENSOCKETFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 163 Global Const $CURLOPT_OPENSOCKETDATA = $CURLOPTTYPE_OBJECTPOINT + 164 Global Const $CURLOPT_COPYPOSTFIELDS = $CURLOPTTYPE_OBJECTPOINT + 165 Global Const $CURLOPT_PROXY_TRANSFER_MODE = $CURLOPTTYPE_LONG + 166 Global Const $CURLOPT_SEEKFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 167 Global Const $CURLOPT_SEEKDATA = $CURLOPTTYPE_OBJECTPOINT + 168 Global Const $CURLOPT_CRLFILE = $CURLOPTTYPE_OBJECTPOINT + 169 Global Const $CURLOPT_ISSUERCERT = $CURLOPTTYPE_OBJECTPOINT + 170 Global Const $CURLOPT_ADDRESS_SCOPE = $CURLOPTTYPE_LONG + 171 Global Const $CURLOPT_CERTINFO = $CURLOPTTYPE_LONG + 172 Global Const $CURLOPT_USERNAME = $CURLOPTTYPE_OBJECTPOINT + 173 Global Const $CURLOPT_PASSWORD = $CURLOPTTYPE_OBJECTPOINT + 174 Global Const $CURLOPT_PROXYUSERNAME = $CURLOPTTYPE_OBJECTPOINT + 175 Global Const $CURLOPT_PROXYPASSWORD = $CURLOPTTYPE_OBJECTPOINT + 176 Global Const $CURLOPT_NOPROXY = $CURLOPTTYPE_OBJECTPOINT + 177 Global Const $CURLOPT_TFTP_BLKSIZE = $CURLOPTTYPE_LONG + 178 Global Const $CURLOPT_SOCKS5_GSSAPI_SERVICE = $CURLOPTTYPE_OBJECTPOINT + 179 Global Const $CURLOPT_SOCKS5_GSSAPI_NEC = $CURLOPTTYPE_LONG + 180 Global Const $CURLOPT_PROTOCOLS = $CURLOPTTYPE_LONG + 181 Global Const $CURLOPT_REDIR_PROTOCOLS = $CURLOPTTYPE_LONG + 182 Global Const $CURLOPT_SSH_KNOWNHOSTS = $CURLOPTTYPE_OBJECTPOINT + 183 Global Const $CURLOPT_SSH_KEYFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 184 Global Const $CURLOPT_SSH_KEYDATA = $CURLOPTTYPE_OBJECTPOINT + 185 Global Const $CURLOPT_MAIL_FROM = $CURLOPTTYPE_OBJECTPOINT + 186 Global Const $CURLOPT_MAIL_RCPT = $CURLOPTTYPE_OBJECTPOINT + 187 Global Const $CURLOPT_FTP_USE_PRET = $CURLOPTTYPE_LONG + 188 Global Const $CURLOPT_RTSP_REQUEST = $CURLOPTTYPE_LONG + 189 Global Const $CURLOPT_RTSP_SESSION_ID = $CURLOPTTYPE_OBJECTPOINT + 190 Global Const $CURLOPT_RTSP_STREAM_URI = $CURLOPTTYPE_OBJECTPOINT + 191 Global Const $CURLOPT_RTSP_TRANSPORT = $CURLOPTTYPE_OBJECTPOINT + 192 Global Const $CURLOPT_RTSP_CLIENT_CSEQ = $CURLOPTTYPE_LONG + 193 Global Const $CURLOPT_RTSP_SERVER_CSEQ = $CURLOPTTYPE_LONG + 194 Global Const $CURLOPT_INTERLEAVEDATA = $CURLOPTTYPE_OBJECTPOINT + 195 Global Const $CURLOPT_INTERLEAVEFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 196 Global Const $CURLOPT_WILDCARDMATCH = $CURLOPTTYPE_LONG + 197 Global Const $CURLOPT_CHUNK_BGN_FUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 198 Global Const $CURLOPT_CHUNK_END_FUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 199 Global Const $CURLOPT_FNMATCH_FUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 200 Global Const $CURLOPT_CHUNK_DATA = $CURLOPTTYPE_OBJECTPOINT + 201 Global Const $CURLOPT_FNMATCH_DATA = $CURLOPTTYPE_OBJECTPOINT + 202 Global Const $CURLOPT_RESOLVE = $CURLOPTTYPE_OBJECTPOINT + 203 Global Const $CURLOPT_TLSAUTH_USERNAME = $CURLOPTTYPE_OBJECTPOINT + 204 Global Const $CURLOPT_TLSAUTH_PASSWORD = $CURLOPTTYPE_OBJECTPOINT + 205 Global Const $CURLOPT_TLSAUTH_TYPE = $CURLOPTTYPE_OBJECTPOINT + 206 Global Const $CURLOPT_TRANSFER_ENCODING = $CURLOPTTYPE_LONG + 207 Global Const $CURLOPT_CLOSESOCKETFUNCTION = $CURLOPTTYPE_FUNCTIONPOINT + 208 Global Const $CURLOPT_CLOSESOCKETDATA = $CURLOPTTYPE_OBJECTPOINT + 209 Global Const $CURLOPT_GSSAPI_DELEGATION = $CURLOPTTYPE_LONG + 210 Global Const $CURLOPT_DNS_SERVERS = $CURLOPTTYPE_OBJECTPOINT + 211 Global Const $CURLOPT_ACCEPTTIMEOUT_MS = $CURLOPTTYPE_LONG + 212 Global Const $CURLOPT_TCP_KEEPALIVE = $CURLOPTTYPE_LONG + 213 Global Const $CURLOPT_TCP_KEEPIDLE = $CURLOPTTYPE_LONG + 214 Global Const $CURLOPT_TCP_KEEPINTVL = $CURLOPTTYPE_LONG + 215 Global Const $CURLOPT_SSL_OPTIONS = $CURLOPTTYPE_LONG + 216 Global Const $CURLOPT_MAIL_AUTH = $CURLOPTTYPE_OBJECTPOINT + 217 ; some convenient "aliases" that follow the name scheme better Global Const $CURLOPT_WRITEDATA = $CURLOPT_FILE Global Const $CURLOPT_READDATA = $CURLOPT_INFILE Global Const $CURLOPT_HEADERDATA = $CURLOPT_WRITEHEADER Global Const $CURLOPT_RTSPHEADER = $CURLOPT_HTTPHEADER ; for use with _curl_global_init() Global Const $CURL_GLOBAL_SSL = BitShift(1, 0) Global Const $CURL_GLOBAL_WIN32 = BitShift(1, -1) Global Const $CURL_GLOBAL_ALL = BitOR($CURL_GLOBAL_SSL, $CURL_GLOBAL_WIN32) Global Const $CURL_GLOBAL_NOTHING = 0 Global Const $CURL_GLOBAL_DEFAULT = $CURL_GLOBAL_ALL Global Const $CURLINFO_STRING = 0x100000 Global Const $CURLINFO_LONG = 0x200000 Global Const $CURLINFO_DOUBLE = 0x300000 Global Const $CURLINFO_SLIST = 0x400000 Global Const $CURLINFO_MASK = 0x0fffff Global Const $CURLINFO_TYPEMASK = 0xf00000 Global Const $CURLINFO_EFFECTIVE_URL = $CURLINFO_STRING + 1 Global Const $CURLINFO_RESPONSE_CODE = $CURLINFO_LONG + 2 Global Const $CURLINFO_TOTAL_TIME = $CURLINFO_DOUBLE + 3 Global Const $CURLINFO_NAMELOOKUP_TIME = $CURLINFO_DOUBLE + 4 Global Const $CURLINFO_CONNECT_TIME = $CURLINFO_DOUBLE + 5 Global Const $CURLINFO_PRETRANSFER_TIME = $CURLINFO_DOUBLE + 6 Global Const $CURLINFO_SIZE_UPLOAD = $CURLINFO_DOUBLE + 7 Global Const $CURLINFO_SIZE_DOWNLOAD = $CURLINFO_DOUBLE + 8 Global Const $CURLINFO_SPEED_DOWNLOAD = $CURLINFO_DOUBLE + 9 Global Const $CURLINFO_SPEED_UPLOAD = $CURLINFO_DOUBLE + 10 Global Const $CURLINFO_HEADER_SIZE = $CURLINFO_LONG + 11 Global Const $CURLINFO_REQUEST_SIZE = $CURLINFO_LONG + 12 Global Const $CURLINFO_SSL_VERIFYRESULT = $CURLINFO_LONG + 13 Global Const $CURLINFO_FILETIME = $CURLINFO_LONG + 14 Global Const $CURLINFO_CONTENT_LENGTH_DOWNLOAD = $CURLINFO_DOUBLE + 15 Global Const $CURLINFO_CONTENT_LENGTH_UPLOAD = $CURLINFO_DOUBLE + 16 Global Const $CURLINFO_STARTTRANSFER_TIME = $CURLINFO_DOUBLE + 17 Global Const $CURLINFO_CONTENT_TYPE = $CURLINFO_STRING + 18 Global Const $CURLINFO_REDIRECT_TIME = $CURLINFO_DOUBLE + 19 Global Const $CURLINFO_REDIRECT_COUNT = $CURLINFO_LONG + 20 Global Const $CURLINFO_PRIVATE = $CURLINFO_STRING + 21 Global Const $CURLINFO_HTTP_CONNECTCODE = $CURLINFO_LONG + 22 Global Const $CURLINFO_HTTPAUTH_AVAIL = $CURLINFO_LONG + 23 Global Const $CURLINFO_PROXYAUTH_AVAIL = $CURLINFO_LONG + 24 Global Const $CURLINFO_OS_ERRNO = $CURLINFO_LONG + 25 Global Const $CURLINFO_NUM_CONNECTS = $CURLINFO_LONG + 26 Global Const $CURLINFO_SSL_ENGINES = $CURLINFO_SLIST + 27 Global Const $CURLINFO_COOKIELIST = $CURLINFO_SLIST + 28 Global Const $CURLINFO_LASTSOCKET = $CURLINFO_LONG + 29 Global Const $CURLINFO_FTP_ENTRY_PATH = $CURLINFO_STRING + 30 Global Const $CURLINFO_REDIRECT_URL = $CURLINFO_STRING + 31 Global Const $CURLINFO_PRIMARY_IP = $CURLINFO_STRING + 32 Global Const $CURLINFO_APPCONNECT_TIME = $CURLINFO_DOUBLE + 33 Global Const $CURLINFO_CERTINFO = $CURLINFO_SLIST + 34 Global Const $CURLINFO_CONDITION_UNMET = $CURLINFO_LONG + 35 Global Const $CURLINFO_RTSP_SESSION_ID = $CURLINFO_STRING + 36 Global Const $CURLINFO_RTSP_CLIENT_CSEQ = $CURLINFO_LONG + 37 Global Const $CURLINFO_RTSP_SERVER_CSEQ = $CURLINFO_LONG + 38 Global Const $CURLINFO_RTSP_CSEQ_RECV = $CURLINFO_LONG + 39 Global Const $CURLINFO_PRIMARY_PORT = $CURLINFO_LONG + 40 Global Const $CURLINFO_LOCAL_IP = $CURLINFO_STRING + 41 Global Const $CURLINFO_LOCAL_PORT = $CURLINFO_LONG + 42 Global Const $CURLINFO_HTTP_CODE = $CURLINFO_RESPONSE_CODE ; The _curl_easy_pause function pauses or unpauses transfers. Select the new state by setting the bitmask, use the convenience defines below. Global Const $CURLPAUSE_RECV = BitShift(1, 0) Global Const $CURLPAUSE_RECV_CONT = 0 Global Const $CURLPAUSE_SEND = BitShift(1, -2) Global Const $CURLPAUSE_SEND_CONT = 0 Global Const $CURLPAUSE_ALL = BitOR($CURLPAUSE_RECV, $CURLPAUSE_SEND) Global Const $CURLPAUSE_CONT = BitOR($CURLPAUSE_RECV_CONT, $CURLPAUSE_SEND_CONT) Global Const $CURL_WRITEFUNC_PAUSE = 0x10000001 Global Const $CURL_READFUNC_ABORT = 0x10000000 Global Const $CURL_READFUNC_PAUSE = 0x10000001 ; $CURLFORM_[what] constants, to be used with _curl_formadd() Global Const $CURLFORM_COPYNAME = 1 Global Const $CURLFORM_PTRNAME = 2 Global Const $CURLFORM_NAMELENGTH = 3 Global Const $CURLFORM_COPYCONTENTS = 4 Global Const $CURLFORM_PTRCONTENTS = 5 Global Const $CURLFORM_CONTENTSLENGTH = 6 Global Const $CURLFORM_FILECONTENT = 7 Global Const $CURLFORM_ARRAY = 8 Global Const $CURLFORM_OBSOLETE = 9 Global Const $CURLFORM_FILE = 10 Global Const $CURLFORM_BUFFER = 11 Global Const $CURLFORM_BUFFERPTR = 12 Global Const $CURLFORM_BUFFERLENGTH = 13 Global Const $CURLFORM_CONTENTTYPE = 14 Global Const $CURLFORM_CONTENTHEADER = 15 Global Const $CURLFORM_FILENAME = 16 Global Const $CURLFORM_END = 17 Global Const $CURLFORM_OBSOLETE2 = 18 Global Const $CURLFORM_STREAM = 19 ; return codes for _curl_formadd() Global Const $CURL_FORMADD_OK = 0 Global Const $CURL_FORMADD_MEMORY = 1 Global Const $CURL_FORMADD_OPTION_TWICE = 2 Global Const $CURL_FORMADD_NULL = 3 Global Const $CURL_FORMADD_UNKNOWN_OPTION = 4 Global Const $CURL_FORMADD_INCOMPLETE = 5 Global Const $CURL_FORMADD_ILLEGAL_ARRAY = 6 Global Const $CURL_FORMADD_DISABLED = 7 ; CURLversion Global Const $CURLVERSION_FIRST = 0 Global Const $CURLVERSION_SECOND = 1 Global Const $CURLVERSION_THIRD = 2 Global Const $CURLVERSION_FOURTH = 3 Global Const $CURLVERSION_NOW = $CURLVERSION_FOURTH Global Const $CURL_VERSION_IPV6 = BitShift(1, 0) Global Const $CURL_VERSION_KERBEROS4 = BitShift(1, -1) Global Const $CURL_VERSION_SSL = BitShift(1, -2) Global Const $CURL_VERSION_LIBZ = BitShift(1, -3) Global Const $CURL_VERSION_NTLM = BitShift(1, -4) Global Const $CURL_VERSION_GSSNEGOTIATE = BitShift(1, -5) Global Const $CURL_VERSION_DEBUG = BitShift(1, -6) Global Const $CURL_VERSION_ASYNCHDNS = BitShift(1, -7) Global Const $CURL_VERSION_SPNEGO = BitShift(1, -8) Global Const $CURL_VERSION_LARGEFILE = BitShift(1, -9) Global Const $CURL_VERSION_IDN = BitShift(1, -10) Global Const $CURL_VERSION_SSPI = BitShift(1, -11) Global Const $CURL_VERSION_CONV = BitShift(1, -12) Global Const $CURL_VERSION_CURLDEBUG = BitShift(1, -13) Global Const $CURL_VERSION_TLSAUTH_SRP = BitShift(1, -14) Global Const $CURL_VERSION_NTLM_WB = BitShift(1, -15) libcURL.au3 #include-once #include <libcURLConstants.au3> ; #INDEX# ======================================================================================================================= ; Title .........: libcURL UDF version 1.0 ; AutoIt Version : 3.3.6.1 + ; Language ......: English ; Description ...: URL transfer functions etc., built on 04/06/2012 05:11:23 GMT, uses libcurl, v7.25.0+, the multiprotocol file transfer library ; Author(s) .....: smartee ; Dll ...........: libcurl.dll ; =============================================================================================================================== ; #VARIABLES# =================================================================================================================== Global $g_hDll_libcurl = -1 ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ;_curl_easy_escape ;_curl_easy_init ;_curl_easy_cleanup ;_curl_easy_duphandle ;_curl_easy_getinfo ;_curl_easy_pause ;_curl_easy_perform ;_curl_easy_recv ;_curl_easy_reset ;_curl_easy_send ;_curl_easy_setopt ;_curl_easy_strerror ;_curl_easy_unescape ;_curl_formadd ;_curl_formfree ;_curl_free ;_curl_getdate ;_curl_global_cleanup ;_curl_global_init ;_curl_global_init_mem ;_curl_slist_append ;_curl_slist_free_all ;_curl_version ;_curl_version_info ; =============================================================================================================================== ; #INTERNAL_USE_ONLY# =========================================================================================================== ;__cURL_DllOpen ;__cURL_DllClose ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name...........: _curl_easy_escape ; Description ...: URL encodes the given string ; Syntax.........: _curl_easy_escape($curl, $url, $length) ; Parameters ....: $curl - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use _curl_easy_init() to get the handle. ; $url - String to be URL encoded. ; $length - Length of the string. If the length argument is set to 0 (zero), _curl_easy_escape() uses strlen() on the input url to find out the size. ; |0 - Calculate length. ; Return values .: Success - The URL encoded string. ; Failure - An empty string, "" ; Author ........: smartee ; Modified.......: ; Remarks .......: ; Related .......: None. ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_escape.html">http://curl.haxx.se/libcurl/c/curl_easy_escape.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_easy_escape($curl, $url, $length) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, "") Local $aRes = DllCall($g_hDll_libcurl, "str:cdecl", "curl_easy_escape", "ptr", $curl, "str", $url, "int", $length) If @error Then Return SetError(2, @extended, "") Return $aRes[0] EndFunc ;==>_curl_easy_escape ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_init ; Description ...: Start a libcurl easy session ; Syntax ........: _curl_easy_init() ; Parameters ....: None. ; Return values .: Success - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_cleanup, _curl_global_init, _curl_easy_reset ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_init.html">http://curl.haxx.se/libcurl/c/curl_easy_init.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_easy_init() If $g_hDll_libcurl == -1 Then __cURL_DllOpen() If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "ptr:cdecl", "curl_easy_init") If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_easy_init ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_cleanup ; Description ...: End a libcurl easy session ; Syntax ........: _curl_easy_cleanup($handle) ; Parameters ....: $handle - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use _curl_easy_init() to get the handle. ; Return values .: Success - 1 ; Failure - 0, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_init ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_cleanup.html">http://curl.haxx.se/libcurl/c/curl_easy_cleanup.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_easy_cleanup($handle) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, 0) DllCall($g_hDll_libcurl, "none:cdecl", "curl_easy_cleanup", "ptr", $handle) If @error Then Return SetError(2, @extended, 0) Return 1 EndFunc ;==>_curl_easy_cleanup ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_duphandle ; Description ...: Clone a libcurl session handle ; Syntax ........: _curl_easy_duphandle($handle) ; Parameters ....: $handle - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use _curl_easy_init() to get the handle. ; Return values .: Success - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_init, _curl_easy_cleanup, _curl_global_init ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_duphandle.html">http://curl.haxx.se/libcurl/c/curl_easy_duphandle.html</a> ; Example .......: No ; =============================================================================================================================== Func _curl_easy_duphandle($handle) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "ptr:cdecl", "curl_easy_duphandle", "ptr", $handle) If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_easy_duphandle ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_getinfo ; Description ...: Extract information from a curl handle ; Syntax ........: _curl_easy_getinfo($handle, $option, Byref $parameter) ; Parameters ....: $handle - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use _curl_easy_init() to get the handle. ; $option - A $CURLINFO_* value. ; $parameter - A variable to be filled in accordingly that can be relied upon only if the function returns $CURLE_OK. ; Return values .: Success - $CURLE_OK or an appropriate $CURLE_* error code will be returned. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_setopt ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html">http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_easy_getinfo($handle, $option, ByRef $parameter) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $asTypes[4] = ["ptr", "long", "double", "ptr"] Local $iParamType = Int($option / 0x100000) - 1 Local $tCURLSTRUCT_INFO = DllStructCreate($asTypes[$iParamType]) Local $aRes = DllCall($g_hDll_libcurl, "int:cdecl", "curl_easy_getinfo", "ptr", $handle, "int", $option, "ptr", DllStructGetPtr($tCURLSTRUCT_INFO)) If @error Then Return SetError(2, @extended, -1) Switch $iParamType Case 0 Local $tCURLSTRUCT_INFOBUFFER = DllStructCreate("char[256]", DllStructGetData($tCURLSTRUCT_INFO, 1)) $parameter = DllStructGetData($tCURLSTRUCT_INFOBUFFER, 1) Case Else $parameter = DllStructGetData($tCURLSTRUCT_INFO, 1) EndSwitch Return $aRes[0] EndFunc ;==>_curl_easy_getinfo ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_pause ; Description ...: Pause and unpause a connection ; Syntax ........: _curl_easy_pause($handle, $bitmask) ; Parameters ....: $handle - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use _curl_easy_init() to get the handle. ; $bitmask - A $CURLPAUSE_* value that sets the new state of the connection. ; Return values .: Success - $CURLE_OK or an appropriate $CURLE_* error code will be returned. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_cleanup, _curl_easy_reset ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_pause.html">http://curl.haxx.se/libcurl/c/curl_easy_pause.html</a> ; Example .......: No ; =============================================================================================================================== Func _curl_easy_pause($handle, $bitmask) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "int:cdecl", "curl_easy_pause", "ptr", $handle, "int", $bitmask) If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_easy_pause ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_perform ; Description ...: Perform a file transfer ; Syntax ........: _curl_easy_perform($handle) ; Parameters ....: $handle - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use _curl_easy_init() to get the handle. ; Return values .: Success - $CURLE_OK or an appropriate $CURLE_* error code will be returned. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_init, _curl_easy_setopt ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_perform.html">http://curl.haxx.se/libcurl/c/curl_easy_perform.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_easy_perform($handle) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "int:cdecl", "curl_easy_perform", "ptr", $handle) If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_easy_perform ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_recv ; Description ...: Receives raw data on an "easy" connection ; Syntax ........: _curl_easy_recv($handle, $buffer, $buflen, $n) ; Parameters ....: $handle - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use _curl_easy_init() to get the handle. ; $buffer - A pointer to your buffer that will get the received data. ; $buflen - The maximum amount of data you can get in that buffer. ; $n - A pointer to a variable that will receive the number of received bytes. ; Return values .: Success - $CURLE_OK or an appropriate $CURLE_* error code will be returned. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_setopt, _curl_easy_perform ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_recv.html">http://curl.haxx.se/libcurl/c/curl_easy_recv.html</a> ; Example .......: No ; =============================================================================================================================== Func _curl_easy_recv($handle, $buffer, $buflen, $n) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "int:cdecl", "curl_easy_recv", "ptr", $handle, "ptr", $buffer, "uint", $buflen, "ptr", $n) If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_easy_recv ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_reset ; Description ...: Reset all options of a libcurl session handle ; Syntax ........: _curl_easy_reset($handle) ; Parameters ....: $handle - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use _curl_easy_init() to get the handle. ; Return values .: Success - 1 ; Failure - 0, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_init, _curl_easy_cleanup, _curl_easy_setopt ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_reset.html">http://curl.haxx.se/libcurl/c/curl_easy_reset.html</a> ; Example .......: No ; =============================================================================================================================== Func _curl_easy_reset($handle) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, 0) DllCall($g_hDll_libcurl, "none:cdecl", "curl_easy_reset", "ptr", $handle) If @error Then Return SetError(2, @extended, 0) Return 1 EndFunc ;==>_curl_easy_reset ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_send ; Description ...: Sends raw data over an "easy" connection ; Syntax ........: _curl_easy_send($handle, $buffer, $buflen, $n) ; Parameters ....: $handle - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use _curl_easy_init() to get the handle. ; $buffer - A pointer to your buffer with data to be sent. ; $buflen - Length of buffer. ; $n - A pointer to a variable that will receive the number of sent bytes. ; Return values .: Success - $CURLE_OK or an appropriate $CURLE_* error code will be returned. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_setopt, _curl_easy_perform, _curl_easy_getinfo ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_send.html">http://curl.haxx.se/libcurl/c/curl_easy_send.html</a> ; Example .......: No ; =============================================================================================================================== Func _curl_easy_send($handle, $buffer, $buflen, $n) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "int:cdecl", "curl_easy_send", "ptr", $handle, "ptr", $buffer, "uint", $buflen, "ptr", $n) If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_easy_send ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_setopt ; Description ...: Set options for a curl easy handle ; Syntax ........: _curl_easy_setopt($handle, $option, $parameter) ; Parameters ....: $handle - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use _curl_easy_init() to get the handle. ; $option - A $CURLOPT_* value. ; $parameter - A long, a function pointer, an object pointer or a large integer, depending on what the specific option expects. ; Return values .: Success - $CURLE_OK or an appropriate $CURLE_* error code will be returned. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_init, _curl_easy_cleanup, _curl_easy_reset ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_setopt.html">http://curl.haxx.se/libcurl/c/curl_easy_setopt.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_easy_setopt($handle, $option, $parameter) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $asTypes[4] = ["long", "ptr", "ptr", "int64"] Local $aRes = DllCall($g_hDll_libcurl, "int:cdecl", "curl_easy_setopt", "ptr", $handle, "int", $option, $asTypes[Int($option / 10000)], $parameter) If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_easy_setopt ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_strerror ; Description ...: Return string describing error code ; Syntax ........: _curl_easy_strerror($errnum) ; Parameters ....: $errnum - A $CURLE_* error code. ; Return values .: Success - A string describing the error code passed in the argument $errornum. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: None. ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_strerror.html">http://curl.haxx.se/libcurl/c/curl_easy_strerror.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_easy_strerror($errnum) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, "") Local $aRes = DllCall($g_hDll_libcurl, "str:cdecl", "curl_easy_strerror", "int", $errnum) If @error Then Return SetError(2, @extended, "") Return $aRes[0] EndFunc ;==>_curl_easy_strerror ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_easy_unescape ; Description ...: URL decodes the given string ; Syntax ........: _curl_easy_unescape($curl, $url, $inlength, $outlength) ; Parameters ....: $curl - A handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use _curl_easy_init() to get the handle. ; $url - String to be decoded. ; $inlength - Length of string, if set to 0 (zero), _curl_easy_unescape() will use strlen() on the input url string to find out the size. ; $outlength - If outlength is non-NULL, the function will write the length of the returned string in the integer it points to. This allows an escaped string containing %00 to still get used properly after unescaping. ; Return values .: Success - A pointer to a zero terminated string or NULL. ; Failure - An empty string, "", Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_escape, _curl_free ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_easy_unescape.html">http://curl.haxx.se/libcurl/c/curl_easy_unescape.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_easy_unescape($curl, $url, $inlength, $outlength) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, "") Local $aRes = DllCall($g_hDll_libcurl, "str:cdecl", "curl_easy_unescape", "ptr", $curl, "str", $url, "int", $inlength, "ptr", $outlength) If @error Then Return SetError(2, @extended, "") Return $aRes[0] EndFunc ;==>_curl_easy_unescape ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_formadd ; Description ...: Add a section to a multipart/formdata HTTP POST ; Syntax ........: _curl_formadd($firstitem, $lastitem, $option, $parameter, $option2, $parameter2[, $option3 = $CURLFORM_END]) ; Parameters ....: $firstitem - A pointer to the firstitem. ; $lastitem - A pointer to the lastitem. ; $option - A $CURLFORM_* value. ; $parameter - A string value depending on $option. ; $option2 - A $CURLFORM_* value. ; $parameter2 - A string value depending on $option. ; $option3 - [optional] A $CURLFORM_* value. Default is $CURLFORM_END. ; Return values .: Success - $CURL_FORMADD_OK or a $CURL_FORMADD_* code. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_easy_setopt, _curl_formfree ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_formadd.html">http://curl.haxx.se/libcurl/c/curl_formadd.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_formadd($firstitem, $lastitem, $option, $parameter, $option2, $parameter2, $option3 = $CURLFORM_END) If $g_hDll_libcurl == -1 Then __cURL_DllOpen() If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "int:cdecl", "curl_formadd", "ptr", $firstitem, "ptr", $lastitem, "int", $option, "str", $parameter, "int", $option2, "str", $parameter2, "int", $option3) If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_formadd ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_formfree ; Description ...: Free a previously build multipart/formdata HTTP POST chain ; Syntax ........: _curl_formfree($form) ; Parameters ....: $form - A pointer as returned from a previous call to _curl_formadd() and may be NULL. ; Return values .: Success - 1 ; Failure - 0, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_formadd ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_formfree.html">http://curl.haxx.se/libcurl/c/curl_formfree.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_formfree($form) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, 0) DllCall($g_hDll_libcurl, "none:cdecl", "curl_formfree", "ptr", $form) If @error Then Return SetError(2, @extended, 0) Return 1 EndFunc ;==>_curl_formfree ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_free ; Description ...: Reclaim memory that has been obtained through a libcurl call ; Syntax ........: _curl_free($ptr) ; Parameters ....: $ptr - A pointer value. ; Return values .: Success - 1 ; Failure - 0, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: None. ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_free.html">http://curl.haxx.se/libcurl/c/curl_free.html</a> ; Example .......: No ; =============================================================================================================================== Func _curl_free($ptr) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, 0) DllCall($g_hDll_libcurl, "none:cdecl", "curl_free", "str", $ptr) If @error Then Return SetError(2, @extended, 0) Return 1 EndFunc ;==>_curl_free ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_getdate ; Description ...: Convert a date string to number of seconds since January 1, 1970 ; Syntax ........: _curl_getdate($datestring, $now) ; Parameters ....: $datestring - A string containing several items separated by whitespace. The order of the items is immaterial. ; $now - Not used, pass a NULL there. ; Return values .: Success - The number of seconds as described. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; |3 - Failed to parse the date string. ; Author ........: smartee ; Modified ......: ; Remarks .......: This parser was written to handle date formats specified in RFC 822 (including the update in RFC 1123) using time zone name or time zone delta and RFC 850 (obsoleted by RFC 1036) and ANSI C's asctime() format. ; These formats are the only ones RFC 2616 says HTTP applications may use. ; Related .......: None. ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_getdate.html">http://curl.haxx.se/libcurl/c/curl_getdate.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_getdate($datestring, $now) If $g_hDll_libcurl == -1 Then __cURL_DllOpen() If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "uint:cdecl", "curl_getdate", "str", $datestring, "ptr", $now) If @error Then Return SetError(2, @extended, -1) If $aRes[0] = -1 Then Return SetError(3, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_getdate ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_global_cleanup ; Description ...: Global libcurl cleanup ; Syntax ........: _curl_global_cleanup() ; Parameters ....: None. ; Return values .: Success - 1 ; Failure - 0, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: This function releases resources acquired by _curl_global_init(). ; Related .......: _curl_global_init ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_global_cleanup.html">http://curl.haxx.se/libcurl/c/curl_global_cleanup.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_global_cleanup() If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, 0) DllCall($g_hDll_libcurl, "none:cdecl", "curl_global_cleanup") If @error Then Return SetError(2, @extended, 0) Return 1 EndFunc ;==>_curl_global_cleanup ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_global_init ; Description ...: Global libcurl initialisation ; Syntax ........: _curl_global_init($flags) ; Parameters ....: $flags - A bit pattern that tells libcurl exactly what features to init. (A $CURL_GLOBAL_* value.) ; Return values .: Success - $CURLE_OK or an appropriate $CURLE_* error code will be returned. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_global_init_mem ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_global_init.html">http://curl.haxx.se/libcurl/c/curl_global_init.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_global_init($flags) If $g_hDll_libcurl == -1 Then __cURL_DllOpen() If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "int:cdecl", "curl_global_init", "long", $flags) If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_global_init ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_global_init_mem ; Description ...: Global libcurl initialisation with memory callbacks ; Syntax ........: _curl_global_init_mem($flags, $m, $f, $r, $s, $c) ; Parameters ....: $flags - A bit pattern that tells libcurl exactly what features to init. (A $CURL_GLOBAL_* value.) ; $m - Callback for malloc, prototype: void *malloc_callback(size_t size); ; $f - Callback for free, prototype: void free_callback(void *ptr); ; $r - Callback for realloc, prototype: void *realloc_callback(void *ptr, size_t size); ; $s - Callback for strdup, prototype: char *strdup_callback(const char *str); ; $c - Callback for malloc, prototype: void *calloc_callback(size_t nmemb, size_t size); ; Return values .: Success - $CURLE_OK or an appropriate $CURLE_* error code will be returned. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: Manipulating these gives considerable powers to the application to severely screw things up for libcurl. Take care! ; Related .......: _curl_global_init, _curl_global_cleanup ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_global_init_mem.html">http://curl.haxx.se/libcurl/c/curl_global_init_mem.html</a> ; Example .......: No ; =============================================================================================================================== Func _curl_global_init_mem($flags, $m, $f, $r, $s, $c) If $g_hDll_libcurl == -1 Then __cURL_DllOpen() If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "int:cdecl", "curl_global_init_mem", "long", $flags, "ptr", $m, "ptr", $f, "ptr", $r, "ptr", $s, "ptr", $c) If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_global_init_mem ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_slist_append ; Description ...: Add a string to an slist ; Syntax ........: _curl_slist_append($list, $string) ; Parameters ....: $list - A list pointer. ; $string - A string value. ; Return values .: Success - A new list pointer. ; Failure - A null pointer or -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_slist_free_all ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_slist_append.html">http://curl.haxx.se/libcurl/c/curl_slist_append.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_slist_append($list, $string) If $g_hDll_libcurl == -1 Then __cURL_DllOpen() If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "ptr:cdecl", "curl_slist_append", "ptr", $list, "str", $string) If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_slist_append ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_slist_free_all ; Description ...: Free an entire curl_slist list ; Syntax ........: _curl_slist_free_all($list) ; Parameters ....: $list - A list pointer. ; Return values .: Success - 1 ; Failure - 0, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_slist_append ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_slist_free_all.html">http://curl.haxx.se/libcurl/c/curl_slist_free_all.html</a> ; Example .......: Yes ; =============================================================================================================================== Func _curl_slist_free_all($list) If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, 0) DllCall($g_hDll_libcurl, "none:cdecl", "curl_slist_free_all", "ptr", $list) If @error Then Return SetError(2, @extended, 0) Return 1 EndFunc ;==>_curl_slist_free_all ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_version ; Description ...: Returns the libcurl version string ; Syntax ........: _curl_version() ; Parameters ....: None. ; Return values .: Success - A pointer to a zero terminated string. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_version_info ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_version.html">http://curl.haxx.se/libcurl/c/curl_version.html</a> ; Example .......: No ; =============================================================================================================================== Func _curl_version() If $g_hDll_libcurl == -1 Then __cURL_DllOpen() If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, "") Local $aRes = DllCall($g_hDll_libcurl, "str:cdecl", "curl_version") If @error Then Return SetError(2, @extended, "") Return $aRes[0] EndFunc ;==>_curl_version ; #FUNCTION# ==================================================================================================================== ; Name ..........: _curl_version_info ; Description ...: Returns run-time libcurl version info ; Syntax ........: _curl_version_info($type) ; Parameters ....: $type - The version of this functionality by the time you write your program. ; Return values .: Success - A pointer to a curl_version_info_data struct. ; Failure - -1, Sets @Error: ; |1 - DLL could not be opened. ; |2 - DllCall failed. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: _curl_version ; Link ..........: <a target="_blank" href="http://curl.haxx.se/libcurl/c/curl_version_info.html">http://curl.haxx.se/libcurl/c/curl_version_info.html</a> ; Example .......: No ; =============================================================================================================================== Func _curl_version_info($type) If $g_hDll_libcurl == -1 Then __cURL_DllOpen() If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, -1) Local $aRes = DllCall($g_hDll_libcurl, "ptr:cdecl", "curl_version_info", "int", $type) If @error Then Return SetError(2, @extended, -1) Return $aRes[0] EndFunc ;==>_curl_version_info ; #INTERNAL_USE_ONLY# =========================================================================================================== ;__cURL_DllOpen ;__cURL_DllClose ; Name ..........: __cURL_DllOpen ; Description ...: Opens the libcurl DLL for use with this UDF library. ; Syntax ........: __cURL_DllOpen() ; Parameters ....: None. ; Return values .: Success - 1, Sets $g_hDll_libcurl to the DLL's handle. ; Failure - 0, Sets @Error: ; |1 - DLL could not be opened. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: __cURL_DllClose ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func __cURL_DllOpen() $g_hDll_libcurl = DllOpen("libcurl.dll") If $g_hDll_libcurl == -1 Then Return SetError(1, @extended, 0) OnAutoItExitRegister("__cURL_DllClose") Return 1 EndFunc ;==>__cURL_DllOpen ; #INTERNAL_USE_ONLY# =========================================================================================================== ;__cURL_DllOpen ;__cURL_DllClose ; Name ..........: __cURL_DllClose ; Description ...: Closes a open handle to the libcurl DLL. ; Syntax ........: __cURL_DllClose() ; Parameters ....: None. ; Return values .: None. ; Author ........: smartee ; Modified ......: ; Remarks .......: ; Related .......: __cURL_DllOpen ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func __cURL_DllClose() If $g_hDll_libcurl <> -1 Then DllClose($g_hDll_libcurl) $g_hDll_libcurl = -1 EndFunc ;==>__cURL_DllClose Example 1: _curl_slist_append.au3 #include <libcURL.au3> _Demo1() Func _Demo1() Local $sURL = "http://www.google.com/search?q=http+headers" Local $hcurl = _curl_easy_init() If ($hcurl) Then ; set referer Local $ptNewList = _curl_slist_append(0, "Referer: http://www.google.com") ; add a custom accept $ptNewList = _curl_slist_append($ptNewList, "Accept: foo") Local $tCURLSTRUCT_URL = DllStructCreate("char[" & StringLen($sURL) + 1 & "]") DllStructSetData($tCURLSTRUCT_URL, 1, $sURL) _curl_easy_setopt($hcurl, $CURLOPT_URL, DllStructGetPtr($tCURLSTRUCT_URL)) _curl_easy_setopt($hcurl, $CURLOPT_VERBOSE, 1) _curl_easy_perform($hcurl) ; redo request with our custom headers: _curl_easy_setopt($hcurl, $CURLOPT_HTTPHEADER, $ptNewList) _curl_easy_perform($hcurl) _curl_slist_free_all($ptNewList) _curl_easy_cleanup($hcurl) EndIf EndFunc ;==>_Demo1 TODO: "multi" interface"share" interfaceDownload: LAST UPDATED: 06-APR-2012 Here's a zipped file with everything you need to get started, (Help-file with examples, calltips.api, userudfs.properties, current libcurl.dll (v7.25.0 & deps) etc.) libcURLUDFv1.0.zip 1.09 MB All feedback is welcome -smartee
  2. Hello, Before Broadcom took over Symantec, I was able to use the following code as the base to scrape daily definition downloads from the web. Since the pages were moved over to the Broadcom web servers, I get a page full of what I believe may be JavaScript instead of the fully rendered page that lies behind it. Does anyone have any suggestions as to how I can read the full rendered webpage using AutoIt? #include <IE.au3> $oIE_DEFS = _IECreate("https://www.broadcom.com/support/security-center/definitions/download/detail?gid=sep14", 0, 0, 1, 1) $sString_DEFS = _IEBodyReadHTML($oIE_DEFS) MsgBox(0, "https://www.broadcom.com/support/security-center/definitions/download/detail?gid=sep14", $sString_DEFS) The above code will show the JavaScript, but if you go to the URL in a browser that has JavaScript enabled, you will see the fully rendered page that I would like to access. I hope my question makes sense, and I would appreciate any suggestions to get this working again. All the best, -Mike
  3. Using the FTP FTPEx.au3 makes communicating with FTP a breeze. With great functions like _FTP_FileGet, _FTP_FilePut, and _FTP_DirPutContents, you can upload and download with ease. But what about the much needed ability to download a folder with a simple _FTP_DirGetContents function? Well I put together a function that will download a folder with ease... _FTP_DirGetContents Function: Func _FTP_DirGetContents($oConn, $opath, $olocal, $orec) If Not FileExists($olocal) Then DirCreate($olocal) If StringRight($opath, 1) <> "/" Then $opath &= "/" If $orec == 1 Then Local $ocurrent = _FTP_DirGetCurrent($oConn) _FTP_DirSetCurrent($oConn, $opath) Local $afolders = _FTP_ListToArray($oConn, 1) _FTP_DirSetCurrent($oConn, $ocurrent) For $o = 1 To $afolders[0] If $afolders[$o] == "." Or $afolders[$o] == ".." Then ContinueLoop If Not FileExists($olocal & "\" & $afolders[$o]) Then DirCreate($olocal & "\" & $afolders[$o]) _FTP_DirGetContents($oConn, $opath & $afolders[$o], $olocal & "\" & $afolders[$o], $orec) Next EndIf Local $hFTPFind Local $aFile = _FTP_FindFileFirst($oConn, $opath, $hFTPFind) While 1 _FTP_FileGet($oConn, $opath & $aFile[10], @ScriptDir & "\tmpdata\" & $aFile[10]) $aFile = _FTP_FindFileNext($hFTPFind) If @error Then ExitLoop WEnd _FTP_FindFileClose($hFTPFind) EndFunc Example Usage: #include <FTPEx.au3> If Not FileExist(@ScriptDir & "\ftptemp") Then DirCreate(@ScriptDir & "\ftptemp") $dir_local = @ScriptDir & "\ftptemp" $dir_remote = "/" Local $iOpen = _FTP_Open('MyFTP Control') Local $iConn = _FTP_Connect($iOpen, "YourFTPServer", "YourUsername", "YourPassword") _FTP_DirGetContents($iConn, $dir_remote, $dir_local, 1) _FTP_Close($iConn) _FTP_Close($iOpen) Function Call Explanation: _FTP_DirGetContents($oConn, $opath, $olocal, $orec) $oConn: session handle as returned by _FTP_Connect. $opath: The remote folder to download $olocal: The local folder to download to. $orec: set to 1 to download folder and subfolders. Set to 0 for non recursive. Enjoy
  4. Hello Can we pause and resume the download in the InetGet function? If is possible, what is the solution please? I used this code To manage the download #include <INet.au3> func _downloader($name, $linc, $filepath, $RTLF = false, $link = false) global $downloader = GUICreate("downloader", 400, 200, -1, -1, $WS_CLIPCHILDREn, $RTLF, $link) global $path = $filePath $labelTxt = GUICtrlCreateLabel("downloading " & $name, 50, 10, 200, 20) global $labelTxt0 = GUICtrlCreateLabel("downloaded size 0 MB " & "OF 0 MB", 50, 60, 300, 20) global $Progress = "" global $sText = "" For $i = 1 To Random(5, 20, 1) ; Return an integer between 5 and 20 to determine the length of the string. $sText &= Chr(Random(65, 122, 1)) ; Return an integer between 65 and 122 which represent the ASCII characters between a (lower-case) to Z (upper-case). next global $labelTxt2 = GUICtrlCreateInput("0%", 50, 80, 50, 20) _GUICtrlEdit_SetReadOnly(-1, true) GUIStartGroup("") global $beep = GUICtrlCreateCheckBox("use the progress beep notification", 150, 120, 200, 20) GUIStartGroup("") $button = GUICtrlCreateButton("Cancel', 130, 150, 180, 25, 0x01) $iIndex = 0 global $Target global $url GUIStartGroup("") global $Progress = GUICtrlCreateProgress(50, 90, 150, 20) global $Target = $filepath global $url = $linc global $path = $filepath global $hDownloadNo = _RSMWare_GetData($url, $Target) global $status = false AdlibRegister("SetProgress") global $onprogress = false, $curent = false GUISetState(@sw_Show) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $button $asc = MsgBox(4132,"exit download?","if you click yes the downloading will be cancel, do you want to cancel it ?") if $asc = 6 then AdlibUnRegister("SetProgress") GUIDelete() If $hDownloadNo <> 0 Then InetClose($hDownloadNo) exitLoop endIf EndSwitch if $status = -1 then $status = 0 $hDownloadNo = _RSMWare_GetData($url, $Target) $onprogress = false $curent = false elseIf $Status = 1 then $status = $path GUIDelete() AdlibUnRegister("SetProgress") exitLoop endIf WEnd return $status endFunc Func _RSMWare_GetData($url, $Target) Local $hDownload = InetGet($url, $Target, 1, 1) Return $hDownload EndFunc ;==>_RSMWare_GetData Func SetProgress() Local $state If $hDownloadNo <> 0 Then $state = InetGetInfo($hDownloadNo) If @error = 0 Then $infor = "downloaded size " & Round(Execute(InetGetInfo($hDownloadNo, $INET_DOWNLOADREAD) / 1048576), 2) & " MB of " & Round(Execute(InetGetInfo($hDownloadNo, $INET_DOWNLOADSIZE) / 1048576), 2) & " MB " $onprogress = Round(Ceiling(($state[0] / $state[1]) * 100)) if not (InetGetInfo($hDownloadNo, $INET_DOWNLOADSIZE) = 0) then if $onProgress <= 0 then $onProgress = 0 GUICtrlSetData($Progress, $onProgress) GUICtrlSetData($labelTxt0, $infor) GUICtrlSetData($labelTxt2, $onProgress & "%") if _isChecked($beep) then if $onprogress > $curent then beep((100 + $onprogress * 20), 100) $curent = $onprogress endIf endIf endIf If $state[2] Then If $state[3] Then InetClose($hDownloadNo) $status = 1 else InetClose($hDownloadNo) $status = -1 endIf endIf EndIf endIf EndFunc ;==>SetProgress
  5. Hello, How can I automatically download a list of zip files, like the ones in the quote, using a AutoIt script? Is it possible with AutoIt script?
  6. Hi, I'm looking to create a script which will download all *.txt files from a remote FTP server. Once downloaded, delete all *.txt files. Can this be achieved using AutoIt ?
  7. Hi I need your help I need download backup from 200 remote pc. I calculate that I can download 20 backups in one time. I need to create loop, take localizations from txt file and start 20 downloads in one time (i want use ShellExecute and robocopy), after finish one from running 20 take another localizations from txt file until localizations finish. And I need trigger if is 7:00 pause script. I hope you know what I mean Many thanks for help, sorry for my english. This is what I got: #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> #include <FileConstants.au3> #include <File.au3> #include <Array.au3> #include <Date.au3> Local $targets = @ScriptDir& "\targets.txt" Local $log_name = "\autoit.log" MsgBox($MB_SYSTEMMODAL, "", "start copy", 1) Example() Func Example() If Not FileExists($targets) Then MsgBox($MB_SYSTEMMODAL, "", "The file targets.txt - doesn't exist!") Exit EndIf FileOpen($targets, 0) Global $arr[1000] ReDim $arr[_FileCountLines($targets)+1] For $i = 1 to _FileCountLines($targets) $line = FileReadLine($targets, $i) $arr[$i] = $line ; Check if is online Local $iPing = Ping($arr[$i], 250) If $iPing Then ; ONLINE $rc = FileCopy("\\"&$arr[$i]&"\e$\backup\", @ScriptDir&"\downloads\"&$arr[$i]&"\", $FC_CREATEPATH) If $rc = 0 Then _FileWriteLog(@ScriptDir & $log_name, $arr[$i]&" ONLINE error") Else _FileWriteLog(@ScriptDir & $log_name, $arr[$i]&" ONLINE done") EndIf Else ;OFFLINE _FileWriteLog(@ScriptDir & $log_name, $arr[$i]&" OFFLINE") EndIf Next EndFunc ;==>Example MsgBox($MB_SYSTEMMODAL, "", "Finish downloads backups") Exit
  8. Hi everyone, Following this page: http://downloads.dell.com/published/pages/latitude-e5450-laptop.html I have to download the BIOS for the E5440 model. As I don't know in which order Dell will place the description and the link to download the file (also because the 5440 can be put in first) I'd like to make the following piece of code to search only first the link that deals with the E5440: (The only thing I'm sure is that the string E5440 will be either in the first or the second position and I need to download the corresponding link) Local $sRead = InetRead('http://downloads.dell.com/published/pages/latitude-e5450-laptop.html', 1) ConsoleWrite(BinaryToString($sRead) & @CRLF) Local $aData = _StringBetween(BinaryToString($sRead), 'Type: BIOS', 'Category:') TrayTip("", "Downloading latest BIOS Version, please wait...", 10, 3) Local $aLinks = _StringBetween($aData[0], '<A HREF="/', '"><IMG') For $i = 0 To UBound($aLinks) - 1 $aLinks[$i] = 'http://downloads.dell.com/' & $aLinks[$i] Next Local $hDownload = InetGet($aLinks[0], @DesktopDir & "\BIOSE5450.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) Do Sleep(250) Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) Local $iBytesSize = InetGetInfo($hDownload, $INET_DOWNLOADREAD) Local $iFileSize = Round(FileGetSize(@DesktopDir & "\BIOSE5450.exe") / 1048576) InetClose($hDownload) MsgBox(0, "", "The latest E5450 BIOS (" & $iFileSize & " MB) have been downloaded") I was thinking of an string search in the array but all my attempts failed for now. Can someone could give me a hand over here.
  9. Hi Guys, Hope you're doing fine today. Well, I'm trying to achieve something I want to integrate to a tool I already created. At work, we deploy computers massively and we use the tool to perform automatic operations. Then, we have to update the BIOS to the latest version. To avoid a heavy tool, I'd like to automatically download the latest BIOS on the Dell Website but the thing is that the name of the fail change when a new version is published. Of course, I cannot know what version will be deployed by Dell but I have this when connecting to the website: Thus, I don't know if the FOLDERXXXXX of the download URL will change if a new version ins deployed. Here's one of the pages of a model we also use: http://www.dell.com/support/home/us/en/19/product-support/product/latitude-e5450-laptop/drivers/advanced Well, i'm kind of stuck here and maybe someone could point something out Thanks in advance
  10. I've written a bot that is loading down pictures from a website. Basically, it opens the website, saves the picture via context menu, and hits a button for loading the next pic. Unfortunately, the pics and my internet connection aren't always the same and it takes longer to load at times. Right now I've got a sleep(3000) in my code, but it isn't very efficient. I waste time if it loads faster than 3000ms, and the program fails if it takes more than 3000ms. So I wanted to make a function that waits until the picture has loaded, and then saves it. I don't know if that causes any problems with possible functions, but it isn't the tab that's loading. The loading circle doesn't appear. It's something on the website. I've adapted to program to chrome, so I'd have to rewrite it partially for the IE functions, so it'd be nice if there was a solution for chrome. --- Thanks!
  11. Version 2.0.1.1

    2,592 downloads

    Search and Get mp3 from Internet : Topic If UAC enabled, Run it as Administrator for the first execution.
  12. Hi all, I'm trying to download a file as a result of an interrogation to a report server, this means I don't have a direct URL from which to download directly the file. I need to interact with the classic "Save as" dialog box To perform this task I wrote a simple piece of code I'm supposed to work, it could be summarized as follows Local $hWndDwnld=WinActivate("Download del file") Sleep(500) If @error Then ConsoleWrite('WinActivate' & '@error = ' & @error & @CRLF & '@extended = ' & @extended) ConsoleWrite("Wait for download file dialog..." & @CRLF) Local $hWndDwnld=WinWaitActive("Download del file") ConsoleWrite(".. found." & @CRLF) WinActivate($hWndDwnld) Endif ;~ waiting for window ControlSend($hWndDwnld, "", "", "!v") ;~ send ctrl+v WinWait("Salva con nome") WinActivate("Salva con nome") ControlSetText("Salva con nome", "", "[CLASS:ToolbarWindow32; INSTANCE:3]", $dest) Sleep(1500) ControlSetText("Salva con nome","","[CLASS:Edit; INSTANCE:1]","") Sleep(1500) $filename="aReport.csv" ;~ ControlSetText("Salva con nome","&Salva","Edit1", $filename) ControlSetText("Salva con nome","","[CLASS:Edit; INSTANCE:1]", $filename) Sleep(1500) $filename=ControlGetText("Salva con nome","&Salva","Edit1") ConsoleWrite(" --> " & $filename & @CRLF) ControlClick("Salva con nome","","Button1")It's based mostly on this post: https://www.autoitscript.com/forum/topic/134561-automating-the-ie-save-as-file-dialog/ What I'would like to obtain is changing the filename and the directory as in the two variables $filename and $dest. Instead I get the file named as provided by the report server and suggested at first in the SaveAs window and dowloaded in the last folder browsed, to be more clear none of the ControlSetText instructions in the snippet above work. TIA for any help. PS: the script is based on the Italian language settings for the WinOS, for the English language the "Download del file" and "Salva con nome" strings should be replaced by "File Download" and "Save As" respectively.
  13. Who can send Ward's MemoryDll udf(2015) to me by email,I can't download it.thanks 121691630@qq.com
  14. Hi Forum, I currently want to write a script that will download the emails from my gmail account and store them on my hard drive in form of text messages. Text file name will have date followed by title of the email and the email body will be the text body. Then I will write my scripts to monitor and inspect emails and post process the data. Anyone can suggest an easy way to achieve this? Maybe it has to be done indirectly via first having an email client that tracks my gmail account and downloads emails to hard drive such as Outlook? Will be very thankful for any suggestions on how to tackle this. Regards
  15. When I click a link to download a file in IE 9, the browser displays a small popup at the bottom of the page, asking to save/open/cancel. I can't figure out how to interact with that. It's not really a window. It's not really part of the HTML page either. It's something else. What I want to do is close/cancel the download before it even starts. I can't figure out how to send a keystroke to do it, nor click the cancel button. AutoIT: 3.3.8.1 IE: 9.0.8 Thanks!
  16. Hi Mates. Recently I was needing to download some images from google images. but I got tired,frustrated when I had to click in the imagen then click again to be able to download the image with its real size. so For That I write this small code. For downloading just simple go over the image in google image page., then press CTRL+MOUSE(just a little move is enowgh) that make a drag&drop so in that moment the code show a little window(5*5 LOL + transparency) so when realease the mouse (mouse up event) the code start new process(itself) to download the image. For well in Google Chrome Broswer. For Firefox almost always fails. Feactures. Allow choose a folder for download save.Allow Open the downloadfolder. #NoTrayIcon #include <GuiRichEdit.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Misc.au3> #include <MsgBoxConstants.au3> #include <TrayConstants.au3> #include <File.au3> #include <InetConstants.au3> Opt("GUIOnEventMode", 1) Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 3) Local $AppExist = 0 If $CmdLine[0] = 0 Then If _Singleton('Danyfirex', 1) = 0 Then MsgBox(64, "", "Aplication is Already Running") Exit EndIf EndIf If $CmdLine[0] = 2 Then ;Downloader to Folder Local $sSaveFolder = $CmdLine[2] ;URL Local $sURL = $CmdLine[1] ;Folder Download($sURL, $sSaveFolder) Exit EndIf If Not @Compiled Then MsgBox(64, "", "Must be Compile For Download") EndIf HotKeySet("{ESC}", "Terminate") Global $sFolderPath = @UserProfileDir & "\Pictures\" Local $hDLL = DllOpen("user32.dll") Local $hGUI, $hRichEdit = 0 $hGUI = GUICreate("Google Image Save", 5, 5, -1, -1, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) $hRichEdit = _GUICtrlRichEdit_Create($hGUI, "", 0, 0, 5, 5, -1) TrayCreateItem("Set Folder to Save") TrayItemSetOnEvent(-1, "SetFolder") TrayCreateItem("") TrayCreateItem("Open Folder") TrayItemSetOnEvent(-1, "OpenFolder") TrayCreateItem("") TrayCreateItem("About...") TrayItemSetOnEvent(-1, "About") TrayCreateItem("") TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "Terminate") TraySetState($TRAY_ICONSTATE_SHOW) WinSetTrans($hGUI, '', 1) GUISetState(@SW_HIDE) Local $aMouse = 0 Local $bCheck = False Local $sDecode = "" Local $i = 0 While True If _IsPressed("11", $hDLL) And _IsPressed("01", $hDLL) Then GUISetState(@SW_SHOW) $aMouse = MouseGetPos() WinMove($hGUI, '', $aMouse[0] - 2, $aMouse[1] - 2) $bCheck = True EndIf If _GUICtrlRichEdit_GetText($hRichEdit) <> '' And $bCheck Then $sDecode = GetURL(_GUICtrlRichEdit_GetText($hRichEdit)) If $sDecode = "" Then $i += 1 TrayTip($i & " Oops :(", 'Not Valid URL', 5) Else $i += 1 TrayTip("[" & $i & "] Downloading :)", $sDecode, 5) If Not @Compiled Then MsgBox(64, "", "Must be Compile For Download") Else ShellExecute("GoogleImageSave.exe", $sDecode & " " & $sFolderPath) EndIf EndIf ConsoleWrite($sDecode & @CRLF) _GUICtrlRichEdit_SetText($hRichEdit, '') GUISetState(@SW_HIDE) $bCheck = False; EndIf Sleep(100) WEnd Func GetURL($BADURL) Local $GoodURL = StringRegExp($BADURL, 'imgurl=(.*)\.(jpg|png|gif|bmp)', 3) If @error Then Return '' Return $GoodURL[0] & '.' & $GoodURL[1] EndFunc ;==>GetURL Func Terminate() If MsgBox($MB_YESNO, "Exit", "¿Do You Want to Exit") = 6 Then Exit EndFunc ;==>Terminate Func SetFolder() $sFolderPath = FileSelectFolder('Select a Folder', "") If $sFolderPath <> "" Then $sFolderPath &= '\' If $sFolderPath = "" Then $sFolderPath = @UserProfileDir & "\Pictures\" EndFunc ;==>SetFolder Func OpenFolder() ShellExecute($sFolderPath) EndFunc ;==>OpenFolder Func About() MsgBox(0, "Autoit Forum :)", "Written by Danyfirex") EndFunc ;==>About Func _GetName($psFilename) Local $szDrive, $szDir, $szFName, $szExt _PathSplit($psFilename, $szDrive, $szDir, $szFName, $szExt) Return $szFName & $szExt EndFunc ;==>_GetName Func Download($Url, $sSaveFolder) Local $sImageName = _GetName($Url) InetGet($Url, $sSaveFolder & $sImageName, $INET_FORCERELOAD) TraySetState($TRAY_ICONSTATE_SHOW) TrayTip("Downloaded :)", "", 0) TrayTip("Downloaded :)", $Url, 5) Sleep(5000) EndFunc ;==>Download Saludos
  17. Hello everyone, Question 1: How to attach an IE Download to a Progressbar? Question 2: How to make an IE Download like a streaming Download(download can be paused and continued every time)? Question 3: How to do it with my UDF like Code :o? Question 4: How to do add a Label which shows the released time? Question 5: How to show how long it takes also the Connection Speed? Question 6: How to get the Connection Speed to a Server? #include-once #include <MsgBoxConstants.au3> ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Patch ; Description ...: Easy Patch System(unzipping currently not included) ; I could need a bit help for this code ^-^. ; Syntax ........: _Patch($DownloadURL, $DownloadPath) ; Parameters ....: $DownloadURL - URL for the Download. ; $DownloadPath - Where the download file will be installed. ; $Title - Project Name Will be displayed in the MsgBox. ; Return values .: None ; Author ........: RaiNote ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; ===============================================================================================================================Func _Patch($DownloadURL,$DownloadPath) Func _Patch($DownloadURL,$DownloadPath,$Title = "Title") $Byte = InetGetSize($DownloadURL,0);Download Size If $Byte > 1024 Then $Kilobyte = $Byte / 1024;Converting Byte to Kilobytes If $Kilobyte > 1024 Then $Megabyte = $Kilobyte / 1024;Converting Kilobyte to Megabyte If $Megabyte > 1024 Then $Gigabyte = $Megabyte / 1024;Converting Megabyte to Gigabyte If $Gigabyte > 1024 Then $Terabyte = $Gigabyte / 1024;Converting Gigabyte to Terabyte If $Terabyte > 1024 Then $Petabyte = $Terabyte / 1024;Converting Terabyte to Petabyte If $Petabyte > 1024 Then $Exabyte = $Petabyte / 1024;Converting Petabyte to Exabyte $_PATCH_SIZE1 = Round($Exabyte,2) & " EB" ElseIf $Petabyte < 1024 Then $Petabyte = $Terabyte / 1024 $_PATCH_SIZE1 = Round($Petabyte,2) & " PB" EndIf ElseIf $Terabyte < 1024 Then $Terabyte = $Gigabyte / 1024 $_PATCH_SIZE1 = Round($Terabyte,2) & " TB" EndIf ElseIf $Gigabyte < 1024 Then $Gigabyte = $Megabyte / 1024 $_PATCH_SIZE1 = Round($Gigabyte,2) & " GB" EndIf ElseIf $Megabyte < 1024 Then $Megabyte = $Kilobyte / 1024 $_PATCH_SIZE1 = Round($Megabyte,2) & " MB" EndIf ElseIf $Kilobyte < 1024 Then $Kilobyte = $Byte / 1024 $_PATCH_SIZE1 = Round($Kilobyte,2) & " KB" EndIf ElseIf $Byte < 1024 Then $_PATCH_SIZE1 = $Byte & " Bytes" EndIf $_PATCH_INFO = MsgBox(52,$Title,$Title & "needs to be patched. If u want to patch continue" & @CRLF & " if not it will close automaticly.(Size :" & " " & $_PATCH_SIZE1 & ")",0) switch $_PATCH_INFO case 6 ;YES $_Patch_Download = InetGet($DownloadURL,$DownloadPath,0,0) case 7 ;NO Exit endswitch EndFunc ​Thx for this I hope someone could help me :3 also how is this UDF with the FileSizeSystem P.S.: Also a cat can get shy.
  18. This project has been discontinued! Here a small tool I wrote to update my Sysinternal tools collection without the need to download always the whole package or visiting the site to check for updates. I know that there are several tools available (also some tools written in AutoIt) but here another one for the collection. It was good exercise for me to code it. Some files from the live web site cannot be downloaded although they are visible! Here the download link of the source code only: AutoIt Sysinternal Tools Synchronizer v0.99.6 build 2020-09-23 beta.7z (1557 downloads previously) -=> Requires AutoIt version 3.3.13.20 or higher / tested on Win8.1 real machine and some VMs: Win7 / Vista / Win10 Compiled exe only: @MediaFire Just select the Sysinternal Tools folder or create one and press the synchronize button to download the selected items. Click on AutoIt label (near to left upper corner) to open menu. Special thanks to LarsJ, Melba23 and mesale0077 for their help. I've still some ideas to implement which are more gimmick related, so it is not finished yet... If you want to add your language please check out #Region Language. Thanks. Please report any bug or if you have any suggestions. The language of the tool tip from each of the executable in the left list view were automatically created using Google translator and weren't checked for correctness. Br, UEZ
  19. So my problem was to download files from temporary links. If you consider Combofix, an util to clean Windows from malware, it's a program updated daily and I want always the last version. But the download link is temporary and always changing, and I don't trust other sites static links. I developed a system to download a list of links, the main idea is to have the list of links in the page and after I go parsing the list to found the correct temporary links. It's dirty but it's working. This is a "lite" version for the forum.: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Icone\Full ico\down.ico #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;NSC 2014 ; download temporary links demo #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <GuiEdit.au3> #include <IE.au3> #include <string.au3> Global $uProgress1, $UPDATE, $updateArray, $updateDownload, $downlist, $adown, $conta Global $downpath = @DesktopDir & "\GetDown" ;_________________ Gui() Prepare() downlist() downloop() end() Exit Func Gui() #Region ### START Koda GUI section ### Form=C:\Program Files (x86)\AutoIt3\Examples\NSC_test\formS\update.kxf $UForm1 = GUICreate("GET DOWN lite V.1.5", 300, 200, 200, 150) GUISetBkColor(0xC0C0C0) $uProgress1 = GUICtrlCreateProgress(265, 5, 30, 190, BitOR($PBS_SMOOTH, $PBS_VERTICAL, $WS_BORDER)) GUICtrlSetColor(-1, 0x0033FF) GUICtrlSetBkColor(-1, 0x000066) $UPDATE = GUICtrlCreateEdit("", 5, 5, 250, 190, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_BORDER)) GUICtrlSetData(-1, "Gettin'down temporary links" & @CRLF) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") GUICtrlSetColor(-1, 0x99FFFF) GUICtrlSetBkColor(-1, 0x330000) GUICtrlSetCursor(-1, 3) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### EndFunc ;==>Gui Func Prepare() If Not FileExists($downpath) Then DirCreate($downpath) EndFunc ;==>Prepare Func downlist() Dim $adown[3] ; in other scripts I download a txt file from internet. $adown[0] = "http://www.bleepingcomputer.com/download/adwcleaner/dl/125/|adwcleaner.exe" $adown[1] = "http://www.bleepingcomputer.com/download/combofix/dl/12/|combofix.exe" $adown[2] = "http://www.bleepingcomputer.com/download/rkill/dl/10/|rkill.exe" _GUICtrlEdit_AppendText($UPDATE, "download list assigned. " & @CRLF) EndFunc ;==>downlist Func downloop() While 1 $filedown = _ArrayPop($adown) If @error <> 0 Then ExitLoop $arraydown = _StringExplode($filedown, "|") ; example of line processed "www.yourlinkhere.com|yourfile.exe" Local $oIE = _IECreate($arraydown[0], 0, 0, 1, 0) ;hidden IE Local $oLinks = _IELinkGetCollection($oIE) ; list of links! Local $iNumLinks = @extended _GUICtrlEdit_AppendText($UPDATE, "Searching in " & $iNumLinks & " links for " & $arraydown[0] & @CRLF) Local $sTxt = $iNumLinks & " links found" & @CRLF & @CRLF ; uncomment for list of links (1/3) For $oLink In $oLinks $sTxt &= $oLink.href & @CRLF ;uncomment for list of links (2/3) If StringInStr($oLink.href, $arraydown[1]) Then Inetdown($oLink.href, $arraydown[1]) EndIf Next MsgBox($MB_SYSTEMMODAL, "Link Info", $sTxt) ;uncomment for list of links (3/3) WEnd EndFunc ;==>downloop Func Inetdown($filedown, $nomefiledown) $updateDownload = InetGet($filedown, $downpath & "\" & $nomefiledown, 1, 1) _GUICtrlEdit_AppendText($UPDATE, "downloading " & $nomefiledown & @CRLF) Do Sleep(500) _GUICtrlEdit_AppendText($UPDATE, "bytes downloaded :" & InetGetInfo($updateDownload, 0) & @CRLF) GUICtrlSetData($uProgress1, (100 * InetGetInfo($updateDownload, 0) / InetGetInfo($updateDownload, 1))) Until InetGetInfo($updateDownload, 2) ; Check if the download is complete. InetClose($updateDownload) ; Close the handle to release resources. _GUICtrlEdit_AppendText($UPDATE, "downloaded in " & $downpath & @CRLF) EndFunc ;==>Inetdown Func end() Run("explorer.exe " & $downpath) MsgBox(64, "NSC GET DOWN", "Files downloaded!") EndFunc ;==>end the Function downloop() contains the trick. The complete version downloads from a public server the list of the files to download, and for every file there is a command to choose various download methods and to exucute commands (run the files etc) after the download, and at the end I have a mail with a report.
  20. Version 1.0

    956 downloads

    This will shutdown the pc whenever the download speed goes under the specified nÂș of KB/s. Should you find any issues, please report to me.
  21. Download Bible in 3 different languages in MP3 format. Bible downloader.zip Russian from 2 servers Ukrainian from 2 servers English KJV from 1 server (Sorry could not find another one) Latest version has a small button to download entire Bible only in Russian language that i collected my self. There some mp3s downloaded that other servers dont have. Hope someone finds this a blessing as i did when i learned Autoit to a level enough to make this application. Big thanks to many people who brought me to where i am in coding right now. I dont remember their names, but i know One who does.
  22. Hi Guys, I'm trying to create a program that'll download .torrent files for me automatically and place them in a folder so uTorrent starts downloading them. The whole script works flawless (for now) except for the most important part: Downloading the .torrent file. It works, it downloads the .torrent file perfectly, but for some reason uTorrent gives me the error that 'the torrent file was not correctly encoded'. For some reason downloading the torrent with InetGet instead of my browser, fucks it up. The size of the torrent is exactly the same as that of the one I download with my browser, still the files are different. This is my script: #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <INet.au3> #include <Array.au3> $downloadfolder = 'C:\Users\Ludo\Downloads\torrents' $searchquiry = StringReplace('the hobbit desolation of smaug', ' ', '+') $preferedsite = 'kickmirror' $link = 'http://torrentz.eu/search?f='&$searchquiry $source = _INetGetSource($link, True) $S1 = StringSplit($source, '<a rel="nofollow" href="/searchA?f='&$searchquiry&'"> date </a> | <a rel="nofollow" href="/searchS?f='&$searchquiry&'"> size </a> | <b> peers </b></h3>', 1) $S2 = StringSplit($S1[2], '<dl><dt style="text-align: right">', 1) $S3 = StringSplit($S2[1], @LF, 1) global $torrents[$S3[0]+1][7] $torrents[0][0] = $S3[0]-1 ; Form of $torrents[a][b] for b: ; $torrents[a][0] = total string ; $torrents[a][1] = torrent url ; $torrents[a][2] = torrent title ; $torrents[a][3] = torrent size ; $torrents[a][4] = torrent seeders ; $torrents[a][5] = torrent peers ; $torrents[a][6] = torrent type For $i = 1 to $torrents[0][0] ;MsgBox(0, '', _StringBetw($S3[$i], '<a href="', '">')) $torrents[$i][0] = $S3[$i] $torrents[$i][1] = _StringBetw($S3[$i], '<a href="', '">') $torrents[$i][2] = _StringStrip(_StringBetw($S3[$i], '<a href="'&$torrents[$i][1]&'">', '</a>')) $temp1 = StringSplit($S3[$i], '</a> &#187; ', 1) $temp2 = StringSplit($temp1[2], '</dt><dd>', 1) $temp3 = StringSplit($S3[$i], '</span></span><span class="s">', 1) $temp4 = StringSplit($temp3[2], '</span> <span class="u">', 1) $temp5 = StringSplit($temp4[2], '</span><span class="d">', 1) $temp6 = StringSplit($temp5[2], '</span>', 1) $torrents[$i][3] = $temp4[1] $torrents[$i][4] = $temp5[1] $torrents[$i][5] = $temp6[1] $torrents[$i][6] = $temp2[1] Next ;_ArrayDisplay($torrents) ;ClipPut($torrents[1][1]&@CRLF&@CRLF&$torrents[$torrents[0][0]][2]) $source2 = _INetGetSource('http://torrentz.eu/'&$torrents[1][1]) $A1 = StringSplit($source2, ' torrent download locations</h2><dl><dt>', 1) $A2 = StringSplit($A1[1], '</span> ', 1) $A3 = StringSplit($A1[2], '<a href="', 1) $locations = $A2[$A2[0]] global $tors[$locations+1] $n = 0 For $i = 2 to $locations $A4 = StringSplit($A3[$i], '" ', 1) $tors[$i] = $A4[1] If StringInstr($tors[$i], $preferedsite) Then $n = $i EndIf Next If $n = 0 Then Msgbox(32, 'Too bad', 'No kickmirror torrent links found..') Exit EndIf ;_ArrayDisplay($tors) $source3 = _INetGetSource($tors[$n], True) ;$B1 = _StringBetw($source3, '<a title="Magnet link" href="', '"') ;ShellExecute($B1) $B1 = _StringBetw($source3, '<a rel="nofollow" title="Download verified torrent file" href="', '"') $B2 = StringSplit($B1, '.torrent?title=', 1) $finallink = $B2[1]&'.torrent' InetGet($finallink,$downloadfolder&'\'&$B2[2]&'.torrent', 4) MsgBox(32, 'Succes', 'Torrent started downloading!') Func _StringBetw($string, $start, $end) $pa = StringSplit($string, $start, 1) If $pa[0] < 2 Then Return 0 $pb = StringSplit($pa[2], $end, 1) Return $pb[1] EndFunc Func _StringStrip($string) $s = StringReplace($string, '<b>', '') $s1 = StringReplace($s, '</b>', '') Return $s1 EndFunc Please try it out, then try to run the torrent with utorrent or some other torrent downloader. If somebody knows what the problem is, I'd be very happy if you'd help me here! Thnx in advance, Ludo
  23. Hi all, I'm using an embedded IE object to fill in a form and submit it. The form uses the POST method and has a Javascript function which runs when the form is submitted and changes some values according to what is entered into the form and generates a nonce, etc. When the form is submitted a file download is triggered. How could I deal with this because at the minute the file download dialog is appearing? The only way I can think of is to send a keypress when the file download window becomes active but I have seen that this is not reliable. Thanks in advance
  24. Hi Everyone! Been away from scripting for a bit and am a bit rusty. I was trying to get downloaded image filenames to increment by one. I was hoping to be able to check the last filename and continue from there if the program was closed and reopened again. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $biolister = GUICreate("Form1", 125, 97, 192, 124) GUISetBkColor(0x99B4D1) $start = GUICtrlCreateButton("Start", 8, 40, 41, 33) GUICtrlSetBkColor(-1, 0x00FFFF) $stop = GUICtrlCreateButton("Stop", 72, 40, 41, 33) GUICtrlSetBkColor(-1, 0xFF0000) $Bio = GUICtrlCreateLabel("Bio Lister", 24, 8, 80, 28) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $filename = 0 $sImgDir = "C:\filepathname\"&$filename&".jpg" $sImgUrl = "http://lorempixel.com/400/200" $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $stop Exit case $start InetGet($sImgUrl, $simgdir, 1, 0) if fileexists( $simgdir & $filename) then $filename + 1 EndSwitch WEnd
  25. This is a Torrent Browser that should only be used to download legal torrents. It helps you to look up and download movie trailers. It should never be used to download copyrighted material. It is an awesome program that any torrent downloader will absolutely love. Neither the AutoIt community nor anyone associated with AutoIt condones to the misuse of this program. Don't do it! That being said download your copy while you can! Before you download this program you must read this first: U.S. Copyright Infringement and Remedies or Understandable Version I suggest everyone read this just for informational purposes: RIAA, MPAA Copyright Warnings: Facts and Fiction There are plenty of legal torrent and therfore justification for this program. Legal Torrents: *Games, Music and Software * Movies and Videos Features: Search 30 different torrent websites including The Pirate Bay simultaneously! Easy to use movie trailer lookup tool! Download torrents with your own set of trackers. All your torrent downloading needs in one place there is no need to open your internet browser! If you happen to come across what you may think is copyrighted material you should immediately report it! Stopping Copyright Infringement The reason I posted this here is of course because I have a question. Will you please allow this autoit created program to be posted on the forums? I and many others realize that there is nothing wrong with this. Pheraps the reasonable authority here would consider allowing the Autoit community decide by vote? The attached is a self extracting archive. The password is "anonymous". To obtain the source run the program from the command line with "extract" as a parameter. example: TorrentBrowser.exe -extract or /extract If you don't want this post to be censored then post your thoughts on the matter. Download Torrent Browser Now! Please do not just delete this post without letting us all know why like it was done before with a similiar topic. I would suggest removing the link instead if whoever needs time to make a decision. Thanks.
×
×
  • Create New...