PHP to VB.NET ?
PHP to VB.NET ?
PHP to VB.NET ?
PHP to VB.NET ?
PHP to VB.NET ?
PHP to VB.NET ? PHP to VB.NET ? PHP to VB.NET ? PHP to VB.NET ? PHP to VB.NET ? PHP to VB.NET ? PHP to VB.NET ? PHP to VB.NET ?
PHP to VB.NET ? PHP to VB.NET ?
PHP to VB.NET ?
Go Back  Xtreme Visual Basic Talk > > > PHP to VB.NET ?


Reply
 
Thread Tools Display Modes
  #1  
Old 05-09-2018, 03:20 AM
stea stea is offline
Newcomer
 
Join Date: Dec 2015
Posts: 1
Default PHP to VB.NET ?


Hi

I'm trying to make work in .NET the use of a third party's API that appears to only be in PHP. Their documentation for the API is quite poor and support options are sadly lacking.

Is there any easy way of converting PHP into .NET ?

For example, this is what they have given us:

PHP Code:
$key 'API KEY';
$secret 'API SECRET';
$base_url 'API URL';
$ref_no 'REFERENCE_NUMBER';

// Create a new cURL resource
$ch curl_init();

// Merge URL and Reference into a GET request
$url $base_url "?ref_no=" $ref_no;

// Set your cURL Options
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_USERPWD$key ":" $secret); 
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);

// Grab URL and pass it to the browser
$output =   curl_exec($ch);

// close cURL resource, and free up system resources
curl_close($ch); 

Thank you in advance!
Reply With Quote
Reply

Tags
api, php, curl, curl_setopt$ch, resource, url, options, $base_url, $key, .net, $ref_no;, ?ref_no=, set, $url;, curlopt_url, vb.net, $url, curl_init;, $ch, merge, request, reference, curlopt_userpwd, curlopt_returntransfer, system


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
PHP to VB.NET ?
PHP to VB.NET ?
PHP to VB.NET ? PHP to VB.NET ?
PHP to VB.NET ?
PHP to VB.NET ?
PHP to VB.NET ? PHP to VB.NET ? PHP to VB.NET ? PHP to VB.NET ? PHP to VB.NET ? PHP to VB.NET ? PHP to VB.NET ?
PHP to VB.NET ?
PHP to VB.NET ?
 
PHP to VB.NET ?
PHP to VB.NET ?
 
-->