4
I consider it quite simple to execute a GET request, normally I use:
//$serverurl contem a url da api para a função desejada
try {
$cursos = file_get_contents($serverurl);
} catch (Exception $e) {
}
After getting a json of response, use the json_decode()
and work that data.
But I’m having trouble executing a POST request, where I need to pass some parameters to the webservice.
I wish I knew the best way to do it.
If possible, I did not intend to use Curl for I have come across restrictions where I could not make use of it...
You use Zend Framework?
– Kenny Rafael
I didn’t want to use any framework...
– Guilherme