AutoITvn!
Chào mừng bạn đến với autoitvn.tk!
Bạn hãy đăng nhập hoặc đăng ký để có thể chat, gửi bài...


Join the forum, it's quick and easy

AutoITvn!
Chào mừng bạn đến với autoitvn.tk!
Bạn hãy đăng nhập hoặc đăng ký để có thể chat, gửi bài...
AutoITvn!
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.
Tìm kiếm
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Đóng gói dữ liệu
giup em su dung cai libcurl.dll Empty29/7/2009, 9:48 am by Khách viếng thăm

» Tạo file và ghi dữ liệu vào File.
giup em su dung cai libcurl.dll Empty27/7/2009, 5:10 pm by _khöç—Thäm...

» Autoit3 – Những sức mạnh ít người biết đến (game engine2d-3d, UDF)
giup em su dung cai libcurl.dll Empty25/7/2009, 8:48 pm by _khöç—Thäm...

» Giới thiệu chung
giup em su dung cai libcurl.dll Empty23/7/2009, 11:46 am by bigbang645

» giup em su dung cai libcurl.dll
giup em su dung cai libcurl.dll Empty12/7/2009, 12:25 am by Admin

» 
giup em su dung cai libcurl.dll Empty3/7/2009, 5:07 am by Admin

» ADMIN báo danh đêeeeee!!!!!!!
giup em su dung cai libcurl.dll Empty1/7/2009, 11:05 am by Admin

» báo danh nào pà kon ^^
giup em su dung cai libcurl.dll Empty29/6/2009, 2:32 am by dinoking

» Game AutoIT
giup em su dung cai libcurl.dll Empty29/6/2009, 2:20 am by dinoking

» xin được báo danh
giup em su dung cai libcurl.dll Empty25/6/2009, 9:10 pm by vodanh1689

Game AutoIT

27/5/2009, 12:27 pm by Admin

Các bạn có nghĩ là AutoIT có thể làm game ko?
Vâng, có thể đấy.
Đây là game AUTOITEROIDS, phần source. Hãy download về tham khảo:
Autoiteroids
File đã được nén. Mình sưu tập từ diễn đàn chính của AutoIT đấy.

Comments: 3

Có thể bạn không nghĩ là AutoIT làm được những điều kỳ diệu này...

26/5/2009, 7:01 am by Admin

Very Happy Nào bạn hãy xem những điều kỳ diệu mà AutoIT có thể làm ra:
Rất nhiều hình vuông màu tuyệt đẹp quay và tạo ra hình ảnh sặc sỡ:
[img][/img][code]giup em su dung cai libcurl.dll Rs10
rotatesquare.au3
Một hệ thống vẽ hình tuyệt hay, nhấn và giữ phím SPACE để đổi kiểu vẽ:
giup em su dung cai libcurl.dll Sf12
[url=http://nth.vnarea.net/systemfractal.au3]…

[ Full reading ]

Comments: 0


giup em su dung cai libcurl.dll

2 posters

Go down

giup em su dung cai libcurl.dll Empty giup em su dung cai libcurl.dll

Bài gửi  vitvn 11/7/2009, 10:39 am

http://curl.haxx.se/download.html

may dai ca oi giup em su dung cai libcurl.dll di :
#include "DllCallBack.au3"

; From libcurl headers
Global Const $CURLOPT_URL = 0x2712
Global Const $CURLOPT_WRITEDATA = 0x2711
Global Const $CURLOPT_WRITEFUNCTION = 0x4E2B
Global Const $CURLOPT_PROGRESSFUNCTION = 0x4E58
Global Const $CURLOPT_NOPROGRESS = 0x2B
Global Const $CURLOPT_ERRORBUFFER = 0x271A
Global Const $CURLOPT_TRANSFERTEXT = 0x35
Global Const $CURL_ERROR_SIZE = 0x100
Global Const $CURL_ENCODING = 10102
Global Const $CURLOPT_VERBOSE = 41
Global Const $CURLINFO_RESPONSE_CODE = 0x200002
Global Const $CURLOPT_FILETIME = 69
Global Const $CURLINFO_HTTP_CONNECTCODE = 0x200016
Global Const $CURLINFO_REQUEST_SIZE = 0x20000C
Global Const $CURLINFO_CONNECT_TIME = 0x300005
Global Const $CURLINFO_CONTENT_TYPE = 0x100012
Global Const $CURLFORM_END = 17
Global Const $CURLFORM_COPYCONTENTS = 4
Global Const $CURLFORM_COPYNAME = 1
Global Const $CURLOPT_HTTPHEADER = 10023
Global Const $CURLOPT_POSTFIELDS = 10015

; Load and initialize curl
$hDll_LibCurl = DllOpen("libcurl.dll")
$hCurlHandle = DllCall($hDll_LibCurl, "ptr:cdecl", "curl_easy_init")
$hCurlHandle = $hCurlHandle[0]

Func getsorce()
DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle, "uint", $CURL_ENCODING, "str", "")


$URL = DllStructCreate("char[256]")

;~ $my_url="http://www.google.com.vn"
;~ $my_url="http://127.0.0.1/vipxinh/?GiaiDieu24h=gamesub&cmgid=6"
;~ $my_url="http://www17.nhac.vui.vn/Music/#List,37"


DllStructSetData($URL, 1,$my_url)
DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle, "uint", $CURLOPT_URL, "ptr", DllStructGetPtr($URL))

$nPerform = DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_perform", "ptr", $hCurlHandle)

DllCall($hDll_LibCurl, "none:cdecl", "curl_easy_cleanup", "ptr", $hCurlHandle)
EndFunc

;getinfo()
Func getinfo()
dim $inf
DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle, "uint", $CURL_ENCODING, "str", "")


$URL = DllStructCreate("char[256]")

$my_url="http://www.google.com.vn"


DllStructSetData($URL, 1,$my_url)
DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle, "uint", $CURLOPT_URL, "ptr", DllStructGetPtr($URL))
DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle, "uint", $CURLOPT_FILETIME, "ptr", true)
$nPerform = DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_perform", "ptr", $hCurlHandle)

$infos = DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_getinfo", "ptr", $hCurlHandle, "uint", $CURLINFO_CONNECT_TIME, "ptr", $inf)
consoleWrite(@CRLF)
consoleWrite(@CRLF)
consoleWrite(@CRLF)
consoleWrite(@CRLF)
consoleWrite(@CRLF)

consoleWrite(@CRLF & "info :"& $inf & @CRLF & @CRLF)
DllCall($hDll_LibCurl, "none:cdecl", "curl_easy_cleanup", "ptr", $hCurlHandle)
EndFunc

func postvn()
;~ /*****************************************************************************
#CS _ _ ____ _
Project ___| | | | _ \| |
/ __| | | | |_) | |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
7 *
8 * $Id: postit2.c,v 1.5 2007-07-12 21:11:10 danf Exp $
9 *
10 * Example code that uploads a file name 'foo' to a remote script that accepts
11 * "HTML form based" (as described in RFC1738) uploads using HTTP POST.
12 *
13 * The imaginary form we'll fill in looks like:
14 *
15 * <form method="post" enctype="multipart/form-data" action="examplepost.cgi">
16 * Enter file: <input type="file" name="sendfile" size="40">
17 * Enter file name: <input type="text" name="filename" size="30">
18 * <input type="submit" value="send" name="submit">
19 * </form>
20 *
21 * This exact source code has not been verified to work.
22 */
23
24 #include <stdio.h>
25 #include <string.h>
26
27 #include <curl/curl.h>
28 #include <curl/types.h>
29 #include <curl/easy.h>
30
31 int main(int argc, char *argv[])
32 {
33 CURL *curl;
34 CURLcode res;
35
36 struct curl_httppost *formpost=NULL;
37 struct curl_httppost *lastptr=NULL;
38 struct curl_slist *headerlist=NULL;
39 static const char buf[] = "Expect:";
40
41 curl_global_init(CURL_GLOBAL_ALL);
42
43 /* Fill in the file upload field */
44 curl_formadd(&formpost,
45 &lastptr,
46 CURLFORM_COPYNAME, "sendfile",
47 CURLFORM_FILE, "postit2.c",
48 CURLFORM_END);
49
50 /* Fill in the filename field */
51 curl_formadd(&formpost,
52 &lastptr,
53 CURLFORM_COPYNAME, "filename",
54 CURLFORM_COPYCONTENTS, "postit2.c",
55 CURLFORM_END);
56
57
58 /* Fill in the submit field too, even if this is rarely needed */
59 curl_formadd(&formpost,
60 &lastptr,
61 CURLFORM_COPYNAME, "submit",
62 CURLFORM_COPYCONTENTS, "send",
63 CURLFORM_END);
64
65 curl = curl_easy_init();
66 /* initalize custom header list (stating that Expect: 100-continue is not
67 wanted */
68 headerlist = curl_slist_append(headerlist, buf);
69 if(curl) {
70 /* what URL that receives this POST */
71 curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/examplepost.cgi");
72 if ( (argc == 2) && (!strcmp(argv[1], "noexpectheader")) )
73 /* only disable 100-continue header if explicitly requested */
74 curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
75 curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
76 res = curl_easy_perform(curl);
77
78 /* always cleanup */
79 curl_easy_cleanup(curl);
80
81 /* then cleanup the formpost chain */
82 curl_formfree(formpost);
83 /* free slist */
84 curl_slist_free_all (headerlist);
85 }
86 return 0;
87 }

#CE




;<input type="text" value="" id="sstring" name="sstring"/>
;<input type="button" onclick="validateSearch();" id="searchButton" value="search" name="search"/>

;" struct curl_httppost next;" _
$httppost_st = "char name;" _;
"long namelength;" _;
"char contents;" _;
"long contentslength;" _;
"char buffer;" _ ;
"long bufferlength;" _;
"char contenttype;" _;
;"struct curl_slist contentheader;" _;
;"struct curl_httppost more;" _ ;
"long flags;" _;
"char showfilename;" _;
"none userp;" ;


$slist_st = "char data;" _
;"struct curl_slist next;" _


$httppost = DllStructCreate($httppost_st)
$slist = DllStructCreate($slist_st)
#CS
static char buf[1024]
$SIZE_HEADERS 5000

static char buf[SIZE_HEADERS + 100];


#CE



DllStructSetData($a,"formpost","none")
DllStructSetData($a,"lastptr","none")
DllStructSetData($a,"headerlist","none")

DllCall($hDll_LibCurl, "uint:cdecl", _
"curl_formadd", "ptr", $formpost, _
"uint", $lastptr, "ptr", _
$CURLFORM_COPYNAME,"str","sstring", _
$CURLFORM_COPYCONTENTS,"str","ndk", _
$CURLFORM_END)

DllCall($hDll_LibCurl, "uint:cdecl", _
"curl_formadd", "ptr", $formpost, _
"uint", $lastptr, "ptr", _
$CURLFORM_COPYNAME,"str","search", _
$CURLFORM_COPYCONTENTS,"str","search" , _
$CURLFORM_END)
#CS
curl = curl_easy_init();
;initalize custom header list (stating that Expect: 100-continue is notwanted */
headerlist = curl_slist_append(headerlist, buf);
if(curl) {
/* what URL that receives this POST */
curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/examplepost.cgi");
if ( (argc == 2) && (!strcmp(argv[1], "noexpectheader")) )
; /* only disable 100-continue header if explicitly requested */
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
res = curl_easy_perform(curl);

; /* always cleanup */
curl_easy_cleanup(curl);


#CE



EndFunc

post_simple()
Func post_simple()
#cs
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* $Id: http-post.c,v 1.2 2004/11/22 14:41:36 bagder Exp $
*/

#include <stdio.h>
#include <curl/curl.h>

int main(void)
{
CURL *curl;
CURLcode res;

curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. This URL can
just as well be a https:// URL if that is what should receive the
data. */
curl_easy_setopt(curl, CURLOPT_URL, "http://postit.example.com/moo.cgi");
/* Now specify the POST data */
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl");

/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);

/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
#CE

;~ ############ translate

DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle, "uint", $CURL_ENCODING, "str", "")


$URL = DllStructCreate("char[256]")

$my_url="http://127.0.0.1/fileNice/"

DllStructSetData($URL, 1,$my_url)
DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_setopt", "ptr", $hCurlHandle, "uint", $CURLOPT_POSTFIELDS, "str", ' value="vcv" id="sstring" name="sstring"')

$nPerform = DllCall($hDll_LibCurl, "uint:cdecl", "curl_easy_perform", "ptr", $hCurlHandle)

DllCall($hDll_LibCurl, "none:cdecl", "curl_easy_cleanup", "ptr", $hCurlHandle)
EndFunc



#CS
;;;;;;;;;;;;;DllStruct
struct curl_httppost {
struct curl_httppost *next; /* next entry in the list */
char *name; /* pointer to allocated name */
long namelength; /* length of name length */
char *contents; /* pointer to allocated data contents */
long contentslength; /* length of contents field */
char *buffer; /* pointer to allocated buffer contents */
long bufferlength; /* length of buffer field */
char *contenttype; /* Content-Type */
struct curl_slist* contentheader; /* list of extra headers for this form */
struct curl_httppost *more; /* if one field name has more than one
file, this link should link to following
files */
long flags; /* as defined below */
#define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */
#define HTTPPOST_READFILE (1<<1) /* specified content is a file name */
#define HTTPPOST_PTRNAME (1<<2) /* name is only stored pointer
do not free in formfree */
#define HTTPPOST_PTRCONTENTS (1<<3) /* contents is only stored pointer
do not free in formfree */
#define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */
#define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */
#define HTTPPOST_CALLBACK (1<<6) /* upload file contents by using the
regular read callback to get the data
and pass the given pointer as custom
pointer */

char *showfilename; /* The file name to show. If not set, the
actual file name will be used (if this
is a file part) */
void *userp; /* custom pointer used for
HTTPPOST_CALLBACK posts */
};



struct curl_slist {
char *data;
struct curl_slist *next;
};






#CE

vitvn

Tổng số bài gửi : 1
Join date : 11/07/2009

Về Đầu Trang Go down

giup em su dung cai libcurl.dll Empty Re: giup em su dung cai libcurl.dll

Bài gửi  Admin 12/7/2009, 12:25 am

Bạn phải nói rõ xem vấn đề là gì chứ.
Nói chung chung thế làm sao mình giúp được.
Cái dll đó dùng để làm gì vậy?
Admin
Admin
Admin

Tổng số bài gửi : 14
Join date : 30/04/2009

https://pcviet.forum-viet.com

Về Đầu Trang Go down

Về Đầu Trang

- Similar topics

 
Permissions in this forum:
Bạn không có quyền trả lời bài viết