/ Published in: PHP
Expand |
Embed | Plain Text
$contents = ''; if ($url) { $ch = curl_init(); $timeout = 0; // set to zero for no timeout curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_COOKIESESSION, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); } $contents = curl_exec($ch); curl_close($ch); } return $contents; }
You need to login to post a comment.
