Click here to Skip to main content
15,890,186 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
the last bit of my php code looks like this:

$curl = curl_init("../s/r.asp"); // the URL that processes your POST

curl_setopt($curl, CURLOPT_POST, true); // use POST method
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json")); // set POST header
curl_setopt($curl, CURLOPT_POSTFIELDS, $json); // set POST body

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // send output to a variable for processing
curl_setopt($curl, CURLOPT_HEADER, true); // set to true if you want headers in the output
curl_setopt($ch, CURLOPT_NOBODY, true); // set to true if you do not want the body
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); // set to false if you want to see what redirect header was sent

$output = curl_exec($curl);


if ($output === false)
  {
    //if the request doesn't send 
    echo 'Curl error: ' . curl_error($curl). '<br />';
    echo 'Curl info: ' . curl_getinfo($curl). '<br />';
    curl_close($curl);
  }
  //Success
  else
  {
    //Close connection
    curl_close($curl);
}


But now, I have to decode and print the data in asp. I don't exactly know where to start. If anyone can provide some guidance or some similar sample code that I can use to understand how I can start that would be appreciated.

What I have tried:

I have read about Dim reader As New System.IO.StreamReader(HttpContext.Current.Request.InputStream)
but again im not sure how to even start
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900