Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Balawant's avatar

Hi All, I want to hide curl response message from the page header.......guide me any one .It executes multiple curl.

Hi All, I want to hide curl response message from the page header.......guide me any one .It executes multiple curl. Message is as following.

[{"responseCode":"Message SuccessFully Submitted"},{"msgid":"7990071"}]{"sell_do_lead_id":"4711","sell_do_lead_verified":"false","error":[],"selldo_lead_details":{"lead_already_exists":true,"lead_created_at":"2021-01-08T13:37:49.824+05:30","exists_by":"4711","stage":"incoming","stage_changed_on":null,"last_sv_conducted_on":null}}

0 likes
3 replies
neilstee's avatar
neilstee
Best Answer
Level 34

@balawant add this to your curl:

curl_setopt(CURLOPT_RETURNTRANSFER, true);

This will return the transfer as a string of the return value of curl_exec() instead of outputting it out directly.

1 like
Balawant's avatar

curl_setopt($ch1,CURLOPT_RETURNTRANSFER,true); curl_setopt($ch2,CURLOPT_RETURNTRANSFER,true);

$mh = curl_multi_init(); curl_multi_add_handle($mh,$ch1); curl_multi_add_handle($mh,$ch2); do { $status = curl_multi_exec($mh, $active); if ($active) { curl_multi_select($mh); } } while ($active && $status == CURLM_OK);

curl_multi_remove_handle($mh, $ch1); curl_multi_remove_handle($mh, $ch2); curl_multi_close($mh);

$sum=0;

Above code is working. Your clue is fine thanks

Please or to participate in this conversation.