1

I am making a CURL request to external site. In response I get a text message and a boolean. I want to format the message to be displayed in my site, but I cannot access the text. This is my request code:

$ch = curl_init();           
curl_setopt($ch,CURLOPT_URL,'url goes here');
curl_setopt($ch,CURLOPT_POST,count($_POST));
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);           
$result = curl_exec($ch);

var_dump($result);    

The response is "This is response textbool(true)" - it detects only the bool and I cannot access the text. Is there a way to access it? Thanks

1 Answer 1

3

You need set another option:

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.