• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 690
  • Last Modified:

php to vb.net or c#

Hello Experts

I am trying to call an API and download some data, I have a PHP example which I am trying to follow and implement the same in VB.Net
I have come across with the following statements in PHP which I am unable to figure out the equivalent in .net
$ch=curl_init();
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

Please can someone advise what it is in .net term?

Thanks
N
0
newbie27
Asked:
newbie27
3 Solutions
 
Meir RivkinFull stack Software EngineerCommented:
what is the purpose of this lines?
instead of trying to convert the code to .net please explain what is it to be gained?
0
 
käµfm³d 👽Commented:
I'd suggest the WebClient class. It should handle SSL for you.
0
 
Meir RivkinFull stack Software EngineerCommented:
basically what those 2 constants means is enable dummy certificate when connection to SSL base remote server in order to get no errors.
The error occurs due to lack of having up to date bundle of CA root certificates.
0
 
charlie324Commented:
Hi,
These are simply curl statements that say that there is no need for SSL security certificate in the post.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now