php to vb.net or c#

Posted on 2013-01-16
Medium Priority
Last Modified: 2013-01-17
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
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

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

Question by:newbie27
LVL 27

Accepted Solution

Lukasz Chmielewski earned 668 total points
ID: 38782854
LVL 42

Expert Comment

by:Meir Rivkin
ID: 38782917
what is the purpose of this lines?
instead of trying to convert the code to .net please explain what is it to be gained?
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38782920
I'd suggest the WebClient class. It should handle SSL for you.
LVL 42

Assisted Solution

by:Meir Rivkin
Meir Rivkin earned 668 total points
ID: 38782929
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.

Assisted Solution

charlie324 earned 664 total points
ID: 38782950
These are simply curl statements that say that there is no need for SSL security certificate in the post.

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
An ASP.NET Web Form User Control is not newly introduced in ASP.NET. In fact, it was an old technology yet still playing a role to generate web content, especially when we want to use it to have a better and easy way to control part of the web conte…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question