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
Solved

php to vb.net or c#

Posted on 2013-01-16
5
605 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Split wordpress loop 35 56
Undefined variable problem 5 23
SQL querys that gives me from one table into another. 2 24
JQuery Detecting page post back 6 10
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

860 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