Link to home
Start Free TrialLog in
Avatar of SimplePaymentSolutions
SimplePaymentSolutions

asked on

PHP to .NET code port

Hiya All,

I am a .NET developer, but very new at PHP... and am running in to a problem.

I am converting an API from PHP to .NET (or rather, an example given in PHP), and need to convert the following php code to .NET so that the output is 100% identical - no differences.

$postfields["customfields"] = base64_encode(serialize(array("Package"=>"Lite", "Additional RAM"=>"None", "Additional Hard Drive Space"=>"None", "Additional IP Address"=>"False")));

As background in case you need it, the example uses CURL to post data to an API. I have successfully converted that portion over to .NET using a WebClient, but cannot get the base64 encoded serialized array to take.

Any help is greatly appreciated!
ASKER CERTIFIED SOLUTION
Avatar of dj_alik
dj_alik

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dj_alik
dj_alik

C#-Base64 Encoding and Decoding
http://www.vbforums.com/showthread.php?t=287324