I need PHP to submit paramaters from one domain to another. JavaScript is not an option for my situation. I\'m now trying to use CURL with PHP, but have not been successful
Using false in CURLOPT_RETURNTRANSFER
doesn't return anything by curl. make it true
(or 1
)
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
Well, its bit late. But adding this answer for further readers who might face similar issue. This issue arises some times when we are sending php curl request from a domain hosted over http to a domain hosted over https (http over ssl).
Just add below code snippet before curl execution.
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);