I would like to ask if there exists a PHP function to simulate this block of code in Codeigniter.
HttpClient httpClient = new HttpClient();
PostMethod postMethod = new PostMethod(requestURL);
NameValuePair[] datas = {new NameValuePair("studentnumber", studentnumber),
new NameValuePair("studentdata", encryptedData)};
postMethod.setRequestBody(datas);
int statusCode = httpClient.executeMethod(postMethod);
byte[] responseByte = postMethod.getResponseBody();
String responseBody = new String(responseByte, "UTF-8");
curl doesn't seem to work, while $this->output->set_output passes the data properly but fails to catch the response of the requestUrl.
Thank you.