Hi
I want to simulate a browser and send custom requests
to the server. Below is PHP code:
$myHeader = array( "Accept-Encoding: gzip,
deflate",
"Accept:
image/gif, image/x-xbitmap,".
"image/jpeg,
image/pjpeg, */*",
"Accept-
Language: en-us",
"User-Agent:
Mozilla/4.0 (compatible;".
"MSIE5.01;
Windows NT)",
"Connection:
Keep-Alive");
curl_setopt($ch, CURLOPT_HTTPHEADER,
$myHeader);
How can do that with VB? Here is my attempt:
Dim arHeaders(1) As String
arHeaders(0) = "Accept -Encoding: gzip , deflate"
arHeaders(1) = "Accept-Charset: ISO-8859-1,utf-
8;q=0.7,*;q=0.7"
vbcurl_easy_setopt easy, CURLOPT_HTTPHEADER,
arHeaders(0)
'Passing Arrays to a DLL Procedure [MSDN HELP
PAGE]
'If you pass the first element of an array to
a DLL procedure,
'that DLL then has access to all of the
array's elements.
When I execute the curl line, VB crashes...
I have the same issue. VB6 chashes when i trying to execute "vbcurl_easy_setopt easy, CURLOPT_HTTPHEADER, arHeaders(0) ". Does anyone have a fix for this bug?