Solved

php to vb.net or c#

Posted on 2013-01-16
5
614 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 75

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

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

730 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