Solved

php to vb.net or c#

Posted on 2013-01-16
5
578 Views
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
$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
Comment
Question by:newbie27
5 Comments
 
LVL 27

Accepted Solution

by:
Lukasz Chmielewski earned 167 total points
ID: 38782854
0
 
LVL 42

Expert Comment

by:sedgwick
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?
0
 
LVL 74

Expert Comment

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

Assisted Solution

by:sedgwick
sedgwick earned 167 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.
0
 
LVL 6

Assisted Solution

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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now