Hi all,
Does anyone know how to prevent calls to InternetOpenUrl() from failing with error 12045 (ERROR_INTERNET_INVALID_CA)? I have the following code below:
Code:
HINTERNET IntOpen = ::InternetOpen(L"Sample", LOCAL_INTERNET_ACCESS, NULL, 0, 0);
HINTERNET handle = ::InternetOpenUrl(IntOpen, L"https://192.168.1.10/file.txt", NULL, NULL, INTERNET_FLAG_IGNORE_CERT_CN_INVALID, NULL);
if (handle == NULL) {
cout << "Error opening URL, " << GetLastError();
return 1;
}
char buf[1024];
DWORD dwRead = 0;
while (InternetReadFile(handle, buf, sizeof(buf), &dwRead) == TRUE) {
if (dwRead == 0)
break;
cout << buf;
}
This works OK on valid sites, but since my server has a self signed certificate, it fails with error code 12045. I know the INTERNET_FLAG_IGNORE_CERT_CN_INVALID is technically looking for hostname mismatches, and not invalid CA's.
Any help would be appreicated.
Thanks,
How do I get the row number from from an sql table query
Hi allI have a table that I query and it returns a number of rows.mysql_num_rows($query) = $totalI want to have next and previous buttons, is there a way of retrieving the current row number, and can
What exactly is net neatrality?
What exactly is it? I think it's anti-censorship and... stuff... but I don't really understand it
Calander Basic Spript help
hi, just starting out with PHP and have the following script: <?php //This gets today's date $date =time () ; //This puts the day, month, and year in seperate variables $day = date('d', $date)
send() and recv() parameters confusion
On server Side:
Checkbox info wont include in Mailto
Hey, im new to php.Basically I have made a form to request which type of job(s) are needed, which when filled will then be sent to an email address.The problem im having is that when more than 1
Career Change into SAP
Hai
Small problem with image resize script
Hi!I am a little bit new to php and I have an issue installing an image resize script I downloaded (http://shiftingpixel.com/2008/03/03/smart-image-resizer/) and can't seem to get it working.Here's a
Request for tunning the below query
Hi,
Help adding strtolower( to my in_array
strtolower i need to add it to this to work, iuno how.Code: $moderators = array('Admin', 'banana', 'orange');if (in_array("{$_SESSION['user_name']}", $moderators)) print('Found it!');i
writing a screen scraper
Hello,I'm writing a screen scraper application and want to be able to get absolute addresses for images from relative links.So a link like this: Code: <img