ch curl_init curl_setopt_array ch array CURLOPT_RETURNTRANSF ER true C

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<?
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_USERAGENT => 'Nokia6303iclassic/5.0 (06.61) Profile/MIDP-2.1 Configuration/CLDC-1.1 Mozilla/5.0 AppleWebKit/420+ (KHTML, like Gecko) Safari/420+',
CURLOPT_URL => 'https://2ch.hk'
));
$res = curl_exec($ch);
echo $res;