1
This same function I put in another question for another reason, in this question I want to delete the text that $result returns:
...
$fields = http_build_query($data);
$post = curl_init();
$url = $url . '?' . $fields;
curl_setopt($post, CURLOPT_URL, $url);
curl_setopt($post, CURLOPT_POST, 1);
curl_setopt($post, CURLOPT_RETURNTRANSFER, false);
curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
$result = curl_exec($post);
curl_close($post);
It turns out that the REST on the server where I do not have direct access, always returns a message (string) beyond true and false, I needed to delete this message because it disturbs me in the construction of the html I need to show the user...
I tried curl_setopt($post, CURLOPT_RETURNTRANSFER, false);
But it didn’t work, I’m starting to use this curl_init now
What I need is simply to know if $result is true or false
It worked out, thanks
– Marcelo