Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8541437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:49:54+00:00 2026-06-11T11:49:54+00:00

I need to send a request from a php server to a .NET one.

  • 0

I need to send a request from a php server to a .NET one.
This request have to be cypted, so I thought about

  • Serializing the params
  • Cypting
  • Base64 encode to put it as HTTP request

Here how I would do in php

$url = 'http://my.server.net';
$params = array('var1' => 5, 'var2' => 'machin', 'var3' => 'chose');
$serialized = json_encode($params);
$crypted = encrypt($serialized, $salt);
$request = $url.'?'.base64_encode($crypted);

encrypt() would encrypt the serialized params with flavoring.

Questions are

  1. Which functions should I use to encrypt my message for it to be
    easily decrypted with .net ?
  2. Is json a good serialization choice for .net ?

I know nothing about .net, that will be done by other guys

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T11:49:55+00:00Added an answer on June 11, 2026 at 11:49 am

    For question one

    • PHP side I think you can use the openssl extension of php http://php.net/manual/fr/book.openssl.php. It brings you a powerful API to do what you want.

    • .NET side You can have a look at http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx or http://www.dart.com/sockets-net-api-library.aspx

    For question 2:

    json is a good serialisation tool but a bit lossy as it is typeless.
    So two solutions here :

    • you know that the .net application will share the same class architecture as yours so using serialize() is good.

    • you do not know that or you know that it will be developped other way so json_encode is the best way to do that. I just want to point out the fact that if you five it as GET you will be limited to 255 chars instead of infinite if you chose a POST request.
      Moreover you have to urlencode your json datas if you want them to be readable

    To send a POST request instead of a GET you can have a look at this script :
    http://www.jonasjohn.de/snippets/php/post-request.htm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need to get 4 request from the server, i have stored all this
I need to send a request to a quote server. Each request should have
I need to send 500 Internal Server Error from an PHP script under certain
I need to send a http post request from my android device to a
I need send certain attributes(say, human readable user name) from server to client after
I have a request.json in mootools to get some data from a php function
I'm trying to send a cURL request from a Windows Server 2008 machine using
I need to send GET Request method with the below headers . I am
Hallo, I need to send a request to a page (POST) and then, I
I need to send a post request when the user leaves the page in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.