php ch curl_init curl_setopt_array ch array CURLOPT_URL url CURLOPT_PO

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
<?php
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => 'url',
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => array(
'name' => '',
'email' => '',
'key' => ''
),
));
$r = curl_exec($ch);
curl_close($ch);
echo $r;