“PHP-Curl” Kode Jawaban

Contoh Curl PHP

function getUrl($url){
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    $response = curl_exec($ch);
    curl_close($ch);
    return $response;
}   
Grepper

PHP-Curl

$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
$result = curl_exec($ch);
curl_close($ch);
//check the result
var_dump($result);
Blue-eyed Barracuda

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya